try-convert
try-convert copied to clipboard
try-convert crashes with "Could not load file or assembly 'System.Runtime"
When running try-convert I get these weird issues.
try-convert.exe --no-backup -m /c/Program\ Files/dotnet/sdk/6.0.300/ --keep-current-tfms -p normalProject.csproj
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb)
at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, String tfm, Boolean forceWebConversion, Boolean preview, Boolean diffOnly, Boolean noBackup, Boolean keepCurrentTfms, Boolean update, Boolean mauiConversion) in /_/src/try-convert/Program.cs:line 133
try-convert.exe --no-backup -m /c/Program\ Files/dotnet/sdk/6.0.101/ --keep-current-tfms -p normalProject.csproj
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb)
at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, String tfm, Boolean forceWebConversion, Boolean preview, Boolean diffOnly, Boolean noBackup, Boolean keepCurrentTfms, Boolean update, Boolean mauiConversion) in /_/src/try-convert/Program.cs:line 133
dotnet tool update -g try-convert
Tool 'try-convert' was reinstalled with the latest stable version (version '0.9.232202')
It works if I build the latest of try-convert. Please update the NuGet package.
Me too, it doesn't seem to have a stable version.
Me too
Me too
I caught the same error too.
I am seeing the same issue
try-convert -m "C:\Program Files\dotnet\sdk\7.0.101"
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The system cannot find the file specified.
File name: 'System.Runtime, Version=7.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb)
at MSBuild.Conversion.Program.Run(String project, String workspace, String msbuildPath, String tfm, Boolean forceWebConversion, Boolean preview, Boolean diffOnly, Boolean noBackup, Boolean keepCurrentTfms, Boolean update, Boolean mauiConversion) in /_/src/try-convert/Program.cs:line 133
and, me too (with multiple SDK 6 versions installed)
Looks like this utility is essentially abandoned. Would be nice if this page https://learn.microsoft.com/en-us/dotnet/core/porting/ stopped pointing people at it?
Same error reported many more times at issues below (duplicates of this ticket). https://github.com/dotnet/try-convert/issues/463 https://github.com/dotnet/try-convert/issues/445
Perhaps this is the replacement? https://learn.microsoft.com/en-us/dotnet/core/porting/upgrade-assistant-overview
Any update with the new tool AKA the replacement?