-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
NuGet Invalid Version String - on Linux when os-versions includes a space in the version #5742
Comments
@rrelyea commented on Fri, 04 Sep 2020 23:10:02 GMT A) what is the content in that older version of the SDK in NUGet.Targets around line 123 (which raised the error). Looks like https://www.man7.org/linux/man-pages/man5/os-release.5.html specifies that a space and parens can be there such as: "32 (Container Image)" -- |
@shyzus commented on Thu, 10 Sep 2020 02:18:45 GMT A) It seems to be a call to restore, see the snippet below:
B) Yes when executing
C) Yes, I have run the command D) If this isn't the appropriate project to submit this issue to, il gladly try and transfer it to the one you believe is appropriate. Edit: Grammer and spelling |
@zkat commented on Thu, 10 Sep 2020 18:00:31 GMT Even if we fix the NuGet side of this, it's likely you'll just run into a separate build error anyway. Is it possible to just remove/clear that environment variable? That might be enough to get this working for you. |
@shyzus commented on Sat, 12 Sep 2020 16:52:06 GMT It would seem to be that there are some checks within the |
@nkolev92 commented on Thu, 17 Sep 2020 17:24:28 GMT The behavior here is driven by an MSBuild feature where environment variables are translates to properties. See: https://docs.microsoft.com/en-us/visualstudio/msbuild/how-to-use-environment-variables-in-a-build?view=vs-2019. Given that the decision is coming from MSBuild moving to their repo and they'll be able to answer more questions. |
@shyzus commented on Tue, 01 Sep 2020 01:47:50 GMT
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): dotnet
NuGet version (x.x.x.xxx): 5.4.0.2
dotnet.exe --version (if appropriate): 3.1.106
VS version (if appropriate): N/A
OS version (i.e. win10 v1607 (14393.321)): Fedora 32.20200831.0 (Silverblue)
Worked before? If so, with which NuGet version: N/A
Detailed repro steps so we can see the same problem
Create toolbox in silverblue with:
toolbox create --container dotnet-toolbox
Enter toolbox:
toolbox enter dotnet-toolbox
Install required packages:
sudo dnf install dotnet-sdk-3.1 dotnet-host dotnet dotnet-templates-3.1 dotnet-targeting-pack-3.1 dotnet-apphost-pack-3.1 dotnet-build-reference-packages mono-devel
Create a new Command Line Application
mkdir MyConsoleApp
cd MyConsoleApp
dotnet new console
Attempt to build
dotnet build
Other suggested things
This can be solved with a hotfix for other Silverblue users by modifying their /etc/os-release file and removing any whitespaces and any parenthesis e.g "()".
However I would suggest whatever code is determining whether a version is valid or invalid is updated to permit whitespaces and/or parenthesis. I am not aware of any issues this change would cause and would like to see this change implemented.
Logs
Sample Project
See step 3.
Edited: Added missing step
The text was updated successfully, but these errors were encountered: