You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 17, 2024. It is now read-only.
try-convert 0.9.4.32202 crashes with: System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file. (0x80131621)
#466
Open
DkSkydancer opened this issue
Jan 24, 2023
· 7 comments
I recently downloaded .NET 5 from the official Microsoft website [link: https://dotnet.microsoft.com/en-us/download/dotnet/5.0].
Please ensure that .NET 5 is installed in your dotnet\sdk folder; otherwise, the migration process will not work.
I executed the following command in the command prompt and it successfully perform the migration to .NET 6.0:
try-convert -tfm net6.0 -m "C:\Program Files\dotnet\sdk\5.0.408"
I just installed try-convert as a global tool (dotnet tool install -g try-convert).
I changed into the root of my git repo and ran 'try-convert'. And i got this exception trace:
d:\Repos\msazure-one\Spartan>try-convert
System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. Could not find or load a specific file. (0x80131621)
File name: 'System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'
at Microsoft.NET.StringTools.InternableString.ExpensiveConvertToString()
at Microsoft.NET.StringTools.WeakStringCache.GetOrCreateEntry(InternableString& internable, Boolean& cacheHit)
at Microsoft.NET.StringTools.WeakStringCacheInterner.Intern(InternableString& candidate, String& interned)
at Microsoft.NET.StringTools.WeakStringCacheInterner.InternableToString(InternableString& candidate)
at Microsoft.NET.StringTools.InternableString.ToString()
at Microsoft.NET.StringTools.SpanBasedStringBuilder.ToString()
at Microsoft.Build.Evaluation.Expander
2.AddArgument(List
1 arguments, SpanBasedStringBuilder argumentBuilder)at Microsoft.Build.Evaluation.Expander
2.ExtractFunctionArguments(IElementLocation elementLocation, String expressionFunction, String argumentsString) at Microsoft.Build.Evaluation.Expander
2.Function1.ConstructFunction(IElementLocation elementLocation, String expressionFunction, Int32 argumentStartIndex, Int32 methodStartIndex, FunctionBuilder
1& functionBuilder)at Microsoft.Build.Evaluation.Expander
2.Function
1.ExtractPropertyFunction(String expressionFunction, IElementLocation elementLocation, Object propertyValue, UsedUninitializedProperties usedUnInitializedProperties, IFileSystem fileSystem)at Microsoft.Build.Evaluation.Expander
2.PropertyExpander
1.ExpandPropertyBody(String propertyBody, Object propertyValue, IPropertyProvider1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties, IFileSystem fileSystem) at Microsoft.Build.Evaluation.Expander
2.PropertyExpander1.ExpandPropertiesLeaveTypedAndEscaped(String expression, IPropertyProvider
1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties, IFileSystem fileSystem, LoggingContext loggingContext)at Microsoft.Build.Evaluation.Expander
2.PropertyExpander
1.ExpandPropertiesLeaveEscaped(String expression, IPropertyProvider1 properties, ExpanderOptions options, IElementLocation elementLocation, UsedUninitializedProperties usedUninitializedProperties, IFileSystem fileSystem, LoggingContext loggingContext) at Microsoft.Build.Evaluation.Expander
2.ExpandIntoStringLeaveEscaped(String expression, ExpanderOptions options, IElementLocation elementLocation, LoggingContext loggingContext)at Microsoft.Build.Evaluation.Expander
2.ExpandIntoStringAndUnescape(String expression, ExpanderOptions options, IElementLocation elementLocation, LoggingContext loggingContext) at Microsoft.Build.Evaluation.ToolsetReader.ExpandPropertyUnescaped(ToolsetPropertyDefinition property, Expander
2 expander)at Microsoft.Build.Evaluation.ToolsetReader.EvaluateAndSetProperty(ToolsetPropertyDefinition property, PropertyDictionary
1 properties, PropertyDictionary
1 globalProperties, PropertyDictionary1 initialProperties, Boolean accumulateProperties, String& toolsPath, String& binPath, Expander
2& expander)at Microsoft.Build.Evaluation.ToolsetReader.ReadToolset(ToolsetPropertyDefinition toolsVersion, PropertyDictionary
1 globalProperties, PropertyDictionary
1 initialProperties, Boolean accumulateProperties)at Microsoft.Build.Evaluation.ToolsetReader.ReadEachToolset(Dictionary
2 toolsets, PropertyDictionary
1 globalProperties, PropertyDictionary1 initialProperties, Boolean accumulateProperties) at Microsoft.Build.Evaluation.ToolsetReader.ReadToolsets(Dictionary
2 toolsets, PropertyDictionary1 globalProperties, PropertyDictionary
1 initialProperties, Boolean accumulateProperties, String& msBuildOverrideTasksPath, String& defaultOverrideToolsVersion)at Microsoft.Build.Evaluation.ToolsetReader.g__ReadConfigToolset|12_0(<>c__DisplayClass12_0& )
at Microsoft.Build.Evaluation.ToolsetReader.ReadAllToolsets(Dictionary
2 toolsets, ToolsetRegistryReader registryReader, ToolsetConfigurationReader configurationReader, PropertyDictionary
1 environmentProperties, PropertyDictionary1 globalProperties, ToolsetDefinitionLocations locations) at Microsoft.Build.Evaluation.ProjectCollection.InitializeToolsetCollection(ToolsetRegistryReader registryReader, ToolsetConfigurationReader configReader) at Microsoft.Build.Evaluation.ProjectCollection..ctor(IDictionary
2 globalProperties, IEnumerable1 loggers, IEnumerable
1 remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, Int32 maxNodeCount, Boolean onlyLogCriticalEvents, Boolean loadProjectsReadOnly, Boolean useAsynchronousLogging, Boolean reuseProjectRootElementCache)at Microsoft.Build.Evaluation.ProjectCollection..ctor(IDictionary
2 globalProperties, IEnumerable
1 loggers, IEnumerable1 remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, Int32 maxNodeCount, Boolean onlyLogCriticalEvents, Boolean loadProjectsReadOnly) at Microsoft.Build.Evaluation.ProjectCollection..ctor(IDictionary
2 globalProperties, IEnumerable1 loggers, IEnumerable
1 remoteLoggers, ToolsetDefinitionLocations toolsetDefinitionLocations, Int32 maxNodeCount, Boolean onlyLogCriticalEvents)at Microsoft.Build.Evaluation.ProjectCollection..ctor(IDictionary
2 globalProperties, IEnumerable
1 loggers, ToolsetDefinitionLocations toolsetDefinitionLocations)at Microsoft.Build.Evaluation.ProjectCollection..ctor(IDictionary
2 globalProperties) at Microsoft.Build.Evaluation.ProjectCollection..ctor() at MSBuild.Abstractions.MSBuildConversionWorkspace..ctor(ImmutableArray
1 paths, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb) in //src/MSBuild.Abstractions/MSBuildConversionWorkspace.cs:line 24at MSBuild.Abstractions.MSBuildConversionWorkspaceLoader.LoadWorkspace(String path, Boolean noBackup, String tfm, Boolean keepCurrentTFMs, Boolean forceWeb) in //src/MSBuild.Abstractions/MSBuildConversionWorkspaceLoader.cs:line 45
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
The text was updated successfully, but these errors were encountered: