try-convert icon indicating copy to clipboard operation
try-convert copied to clipboard

Crash with System.Runtime not found

Open johnnyontheweb opened this issue 2 years ago • 3 comments

Similarly to previous issues, I have this:

try-convert -w MySolution.sln -m "C:\Program Files\dotnet\sdk\6.0.402"

crashes with:

System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Impossibile trovare il file specificato.
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

johnnyontheweb avatar Oct 26 '22 14:10 johnnyontheweb

Did you find solution, please share it if you do... Ty in advance...

az-zyr avatar Nov 01 '22 20:11 az-zyr

I am encountering this exact issue as well.

JerryJoyce avatar Dec 14 '22 18:12 JerryJoyce

Same here. The first issue I had was that the tool says there are multiple SDK versions installed, but it shows zero to choose from. That's apparently caused by me only having the .NET 7.0 SDK installed while try-convert is targeting .NET 6.0 and it cannot use future versions. So, I installed the .NET 6.0 SDK.

When I specifiy the SDK version like the topic started did, I see the same FileNotFoundException. When I specify the full path to MsBuild.exe ("C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Current\Bin\MSBuild.exe") I get an error saying it can't find a subfolder.

brinkdinges avatar Dec 23 '22 13:12 brinkdinges