-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update-Package fails in VS with failure to modify app.config #894
Comments
Changes to packages.config:
|
If I remove+delete the file app.config from my project ResourceModel.Tests, the problem won't repro. Also, nuget won't recreate the app.config file. |
These are the contents of the app.config file in question before I delete it:
|
This bug is in VS version 14.0.23023.0 D14REL |
I used the project shared by @TimLovellSmith. It looks like app.config of the project SimplifiedDeployment.Tests is linked to app.config of project SimplifiedDeployment. NuGet is trying to add an app.config to SimplifiedDeployment.Test when 'xunit.core' is updated across the solution, and is unable to add it since there is a linked file in the folder with the same name Simpler repro steps:
Actual: @yishaigalatzer and @TimLovellSmith, Is this not the expected behavior too? |
Ah whoops, I didn't realize we were sharing. We do this sharing across projects so that they will both get the exact same appSettings part of configuration - and other parts of app.config too. Would it be reasonable for nuget to do something like use the original (linked) file (app.config) as a baseline, make the changes to app.config it wants to make, and (if there were any actual changes) then change the file to be unlinked, and just write a new app.config file - point the project at it - and have update-package succeed with a warning that it unlinked the file? That is the closest I can imagine to having nuget intelligently doing the right thing. |
At the least the console output is really confusing - it doesn't mention which app.config is causing the problem, it just says 'There is already a linked file in this folder with the same name.' - which folder? |
Just noticed that project SimplifiedDeployment.Tests depends on project AzureCache.ResourceModel.Tests.. so updating the package in AzureCache.ResourceModel.Tests will try to update app.config of SimplifiedDeployment.Tests This is why the error message is confusing... However, note that updating simplifieddeployment.tests project alone would fail too |
+1 |
2 similar comments
+1 |
+1 |
We plan to fix this for 3.2, this seems to be a duplicate of another bug @feiling can you please resolve the duplication? |
nice to see that you moved it to 3.2. |
Yes, we initially those thought this is a very small scenario, apparently we where wrong. Based on the amount of feedback we moved it to 3.2 |
This is a duplicate of #1111. The problem is that nuget could not handle linked app.config. This was fixed. |
Stack trace:
locals:
{NuGet.PackageManagement.VisualStudio.VSMSBuildNuGetProjectSystem.AddFileToProjectAsync}.ppath = "app.config"
The text was updated successfully, but these errors were encountered: