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
DockerUpdateComposeVsGeneratedFiles throws "Value cannot be null" ("Parameter name: path1") after updating to Visual Studio 16.3 #211
Comments
Can you share your solution? In particular we'd be interested to see the Dockerfiles, docker-compose.*.yml files, and docker-compose.dcproj, along with the structure of the solution... |
Yes I could share privately. |
Having got this working (though not exactly sure how) in Preview 4, it is now back with the release of 16.3. Solution structure:
Each Dockerfile follows this template:
docker-compose.yml follows this pattern:
Building in Visual Studio results in:
|
@frankbuckley Do these csproj's use a custom output path? |
No |
Rats, that was my best guess. Are you able to share the full solution so I can try it out? |
I have the same problem. |
Yes - I can - can I email a zip? |
Yes, my email is my username, except microsoft.com instead of msft, and @ instead of at. :) |
similar issue here after updating from asp.net core 2.2 to 3.0, although it builds fine in VS, but using msbuild on command line I get the above errors. |
I've the same issue. Compared to a fresh project the files "RelativeOutputAssemblyPath.Fast.cache" and "RelativeOutputAssemblyPath.Regular.cache" are not in obj/Docker. If I copy over these two files the error disappears. I then removed the bin and obj folder from the fresh Project I created and did a rebuild and now I'm getting that error there, too. It seems like these two files are not regenerated. Even a clean and rebuild doesn't help. As they are located in the "obj" folder they shouldn't be required but generated, right? Especially as obj usually is .gitignore'd |
It seems like these files are generated when starting the docker-compose project but not when just building the Solution or the Project via rightclick -> Build. What I also noticed is that when switching Debug to Release the RelativeOutputAssemblyPath.*.cache files still contain the Debug build until starting the project which then create the new files. |
We've identified the issue, it is in the SDK so it will need to be addressed in a servicing update. As far as I know there are two possible workarounds--
For command line builds, if you do a release build instead of debug (i.e. |
Is there an ETA on the fix? or perhaps is it posible to put a |
@mmisztal1980 Unfortunately a target would not be very simple to do at all. You can enable warmup or F5 the docker-compose project once and the issue should no longer occur (until you clean your source enlistment). We have just put the fix into the 16.3 servicing branch, so it will be available in the next servicing release of 16.3 (16.3.3), as well as the next preview of 16.4 (16.4 Preview 2) |
Now that 16.3.4 is released the fix is available. I'll close this issue. Please let us know if you still see the problem! |
Are there work-arounds to get this working under VS2019? I am using: Microsoft Visual Studio Enterprise 2019, Version 16.5.4, VisualStudio.16.Release/16.5.4+30011.22, Microsoft .NET Framework |
This seems similar to issue #174 although parameter name is
path1
:It began after updating to VS 16.3 Preview 4 and migrating web app projects to ASP.NET Core 3.0.
Moving the
Dockerfile
out of the project root does fix the problem. However, should this really be necessary when upgrading?The text was updated successfully, but these errors were encountered: