It is discussed here.
Adding Connected WCF Service to .NET 3.1 project results in access denied error
I have a .NET core 3.1 project in VS2019. Attempting to add a connected service reference for a legacy WCF service. However, it blows up during scaffolding with access denied error even though I am running VS2019 as administrator.
Importing web service metadata ...
Scaffolding service reference code ...
ErrorAccess to the path 'C:\Users\myuser\AppData\Local\Temp\WCFConnectedService\2021_Oct_29_11_01_02\svcutil_starter\nuget.config' is denied.
Done.
ErrorFailed adding service reference(s). Index (zero based) must be greater than or equal to zero and less than the size of the argument list.
Looking at the nuget.config, you can clearly see that it is a readonly file. I can remove the readonly attribute and try again but it doesn't affect the outcome since this folder is auto generated on each service reference attempt.
Please help.
Microsoft Visual Studio Professional 2019
Version 16.11.5
VisualStudio.16.Release/16.11.5+31729.503
Microsoft .NET Framework
Version 4.8.04084
Installed Version: Professional
Windows 10 19042.1165
3 answers
Sort by: Oldest
-
-
ScottM 331 Reputation points
2021-10-29T18:14:46.143+00:00 I checked but neither my solution or project level folders have a nuget.config. So no idea how the nuget.config is causing a readonly error.
-
ScottM 331 Reputation points
2021-10-29T18:38:29.227+00:00 Checked and the global nuget.config does not have a readonly attribute.