I haven't published my cloud service in quite awhile and I am not usually the one to do it as I have taken over a project. When I initially tried to publish it eventually failed and said my settings are probably invalid so I downloaded a new copy of the ServiceConfiguration.Cloud.cscfg file. The only thing different that I could see is new settings for RemoteDebugging:
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Enabled" value="true" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.Connector.Version" value="2.3" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.ClientThumbprint" value="X" />
<Setting name="Microsoft.WindowsAzure.Plugins.RemoteDebugger.ServerThumbprint" ...
With the new settings however I am unable to build. It complains that the RemoteDebugger is specified but not declared the ServiceDefinition file.
I thought adding a module would help but it doesn't find it by the name RemoteDebugger. Any help would be greatly appreciated.
<Imports>
<Import moduleName="Diagnostics" />
<Import moduleName="RemoteAccess" />
<Import moduleName="RemoteForwarder" />
...tried a few different possible names here
</Imports>
I don't see any way to download this ServiceDefinition file and looking at this post:
How to enable remote debugging in Azure Cloud Service package built by MSBuild
...I see a bunch of settings in the ServiceDefinition file that are supposed to be inserted automatically. However I have no idea what these settings should be or how to generate them.
Related
I'm trying to publish a single file for a c# wpf application ( net core 6 ), without success: the pdb files are always added to the output folder. It needs to be done using VS for ... reasons.
1- Created the publish profile
2.1- Added the following line to the cs proj i'm trying to build
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
2.2- Added the following lines to all the projects in the solution
<DebugSymbols>False</DebugSymbols>
<DebugType>None</DebugType>
3- The solution also has a global NuGet.config file, and my feeling is that the issue is here: if i use the "RestorePackages" condition, no error is found but the pdbs are generated. If I don't use the condition, i get a build error. If I remove the "PackageRestore", everything is ok but it affects the debug mode, which is mandatory to have automatic restore.
<RestorePackages Condition="$(RestorePackages) == '' AND '$(Configuration)' == 'Release'">false</RestorePackages>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<clear />
<add key="mySource" />
</packageSources>
??
What am i missing? Thanks
I am using ConfigurationManager.AppSettings["someKey"] to retrieve values from app.config appSettings
<appSettings>
<add key="someKey" value="value" />
...
However, when I use this in my unit tests, the ConfigurationManager.AppSettings collection is empty.
This happens only when I run the tests from JetBrains Rider IDE!
Running them from Visual Studio (even with ReSharper runner) works perfectly fine and values are loaded.
It is a .Net 5 project using XUnit framework.
What is going on with Rider here?
First make sure the app.config is in the correct format. since you want to reference ConfigurationManager.AppSettings["someKey"]
the app.config should be structed this way
<configuration>
<appSettings>
<add key="someKey" value="value" />
</appSettings>
</configuration>
copy the app.config to the project-folder\bin\Debug\net5.0 and rename in a way that is understood by the IDE which can be achieved through adding the following lines in project file
<Target Name="CopyCustomContent" AfterTargets="AfterBuild" >
<Copy SourceFiles="app.config" DestinationFiles="$(OutDir)/ReSharperTestRunner.dll.config" />
<Target/>
Hope this helps!!
I'm aware of the other posts about the same signature. I still can't resolve my issue after going thru them.
My team uses VSTS's build definition for continuous integration.
This build definition works fine until the lastes pull request.
I'm running into the error msg below during the Nuget Restore
2018-06-20T00:37:27.6438127Z System.AggregateException: One or more errors occurred. ---> NuGet.Protocol.Core.Types.FatalProtocolException: Unable to load the service index for source https://microsoft.pkgs.visualstudio.com/_packaging/CBT/nuget/v3/index.json. ---> System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized).
I do have https://microsoft.pkgs.visualstudio.com/_packaging/CBT/nuget/v3/index.json in the nuget.config, and there is nothing changed in the nuget.config in the failing PR
I can nuget restore and build the entire solution successfully on my local machine using VS2017. The only related change in the PR is that instead of using package.config, it uses packagereference to get the nuget package. I tried to move back to using package.config, the build would still fail with the same error msg.
Thanks in advance.
You can update the VSTS feed with credentail (PAT or alternate credential) in the specified nuget.config file.
Such as:
nuget sources update -Name "vstsfeed" -Source https://microsoft.pkgs.visualstudio.com/_packaging/CBT/nuget/v3/index.json -Username "Alternate username" -Password "alternate password" -configfile /path/to/nuget.config
Then you can commit the changes for the nuget.config file and push to VSTS repo. And build again to check if it works.
You can use a command as shown in the accepted answer - also, you can add the feed in a nuget.config file placed in the root of your repo
Notice, this shows how to add credentials for a custom feed with spaces in the feed name: My Nuget Artifacts
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<!-- Allow NuGet to download missing packages -->
<add key="enabled" value="True" />
<!-- Automatically check for missing packages during build in Visual Studio -->
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="NuGet official package source" value="https://api.nuget.org/v3/index.json" />
<add key="My Nuget Artifacts" value="https://pkgs.dev.azure.com/ConsotoOrg/_packaging/Consoto/nuget/v3/index.json" />
</packageSources>
<packageSourceCredentials>
<My_x0020_NuGet_x0020_Artifacts>
<add key="Username" value="justme" />
<add key="ClearTextPassword" value="xyzyoqyvslyfs1t1khru6wd33gebujhpr9moocbujfhv8ukxtxyz" />
</My_x0020_NuGet_x0020_Artifacts>
</packageSourceCredentials>
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
<!--
Used to specify trusted signers to allow during signature verification.
See: nuget.exe help trusted-signers
-->
<trustedSigners>
<author name="microsoft">
<certificate fingerprint="3F9001EA83C560D712C24CF213C3D312CB3BFF51EE89435D3430BD06B5D0EECE" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
</author>
<repository name="nuget.org" serviceIndex="https://api.nuget.org/v3/index.json">
<certificate fingerprint="0E5F38F57DC1BCC806D8494F4F90FBCEDD988B46760709CBEEC6F4219AA6157D" hashAlgorithm="SHA256" allowUntrustedRoot="false" />
<owners>microsoft;aspnet;nuget</owners>
</repository>
</trustedSigners>
</configuration>
FWIW - In recent days, I've found I can clear up some NuGet restore errors by removing the trustedSigners section from the config
This is not what the problem was with the OP but I'm adding a note here since I found this question while searching for the same error message.
In our case we were building a .net 5 app for in Azure DevOps. We had to upgrade to a newer version of NuGet using the NuGet tool installer. Then the restore worked just fine using the .Net Core task with the restore command.
I have an issue in VS2015 where adding a NuGet source is not working.
The picture below shows the source. The URL and package name is correct and working (I can successfully push packages to the repo).
The problem is when I add it, check the checkbox, and select "Update" and "Save", it does not activate the source. When I go back into the dialog, the checkbox is unchecked. It remains unchecked no matter what I do.
I think this is a GUI issue, the problem seems to be it simply is not enabling it. Is there a config option in a project file I can manually this package source?
(Note that "NAME" and "http://myrepo.com" are not the real source name and url, but I have verified they are correct by pushing to it successfully.
Edit:
I checked the NuGet.config file and there is indeed an entry in the file:
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageRestore>
<add key="enabled" value="True" />
<add key="automatic" value="True" />
</packageRestore>
<packageSources>
<add key="nuget.org" value="https://www.nuget.org/api/v2/" />
<add key="NAME" value="http://myrepo.com" />
</packageSources>
<disabledPackageSources />
<activePackageSource>
<add key="All" value="(Aggregate source)" />
</activePackageSource>
</configuration>
I had been running VS as administrator due to using a local IIS instance which requires administrator privileges, magicandre1981 pointed out that NuGet.config needs write permissions, so I gave full access to the folder to normal users (I believe the NuGet.config file was generated under the administrator context therefore lacking normal user permissions).
This by itself did not solve the issue, but doing a Nuget Package Restoreafterwards, caused the NuGet feed to display again.
Edit:
To be more clear, My question is how to overwrite machine.config setting from app.config for <oracle.manageddataaccess.client> without modify machine.config.
I have to do that is because Visual studio EntityFramework Wizard/Server Explorer relay on machine level setting.
I have to config/register oracle.ManagedDataAccess on machine level in order to make Oracle.ManagedDataAccess.EntityFramework work with Visual studio 2015 (Is this true? Is there another way?).
Otherwise, I got following error on my .edmx file , and can't view model or connect to database , even from Server Explorer.
Error 175: The ADO.NET provider with invariant name 'Oracle.ManagedDataAccess.Client' is either not registered in the machine or application config file, or could not be loaded. See the inner exception for details.
The problem I have is that the oracle configure not only add the dll into GAC,
It also add a following entry into my machine.config file.
<version number="4.121.2.0">
<settings>
<setting name="TNS_ADMIN" value="*my oracle home*\odp.net\managed\x86\..\..\..\network\admin" />
</settings>
</version>
Which is a problem when I indeed using version 4.121.2.0 and want to change that on application level.
What I want to do is to overwrite my machine.config setting in my app.config use following instead of mess around with my machine.config file
<version number="*">
<settings>
<setting name="TNS_ADMIN" value="C:\OtherPalce\Oracle" />
</settings>
Can not find any document that show me how to do that.
Is there a <clear> tag that supported under tag <oracle.manageddataaccess.client>
Or something else like add <remove version number="*"> on top.