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
If project name (including .csproj) is longer than 17 chars, SolutionParser fails with this error:
dotnet "c:\Users\user\.vscode\extensions\avaloniateam.vscode-avalonia-0.0.31\solutionParserTool\SolutionParser.dll" "c:\redacted\avalonia-learn\avalonia-learn.sln"
Error parsing project GetStartedApp: Invalid static method invocation syntax: "[MSBuild]::SubstringByAsciiChars($(MSBuildProjectFile), 0, 8)". Method '[MSBuild]::SubstringByAsciiChars' not found. Static method invocation should be of the form: $([FullTypeName]::Method()), e.g. $([System.IO.Path]::Combine(`a`, `b`)). Check that all parameters are defined, are of the correct type, and are specified in the right order. C:\Program Files\dotnet\sdk\8.0.403\Microsoft.Common.CurrentVersion.targets
Relevant part of Microsoft.Common.CurrentVersion.targets:
<PropertyGroupCondition="'$(MSBuildCopyMarkerName)' == ''">
<MSBuildCopyMarkerName>$(MSBuildProjectFile)</MSBuildCopyMarkerName>
<!-- For a long MSBuildProjectFile let's shorten this to 17 chars - using the first 8 codepoints of the filename and a filename hash. -->
<MSBuildCopyMarkerNameCondition="'$(MSBuildCopyMarkerName.Length)' > '17'">$([MSBuild]::SubstringByAsciiChars($(MSBuildProjectFile), 0, 8)).$([MSBuild]::StableStringHash($(MSBuildProjectFile)).ToString("X8"))</MSBuildCopyMarkerName>
<MSBuildCopyMarkerName>$(MSBuildCopyMarkerName).Up2Date</MSBuildCopyMarkerName>
</PropertyGroup>
To Reproduce
dotnet new install Avalonia.Templates
dotnet new avalonia.mvvm -o GetStartedApp
dotnet new sln
dotnet sln add GetStartedApp
Downgrade Avalonia to 11.0.2 and run dotnet restore
Try to open the previewer and get "Previewer is not available. Build the project first."
Describe the bug
If project name (including
.csproj
) is longer than 17 chars, SolutionParser fails with this error:Relevant part of Microsoft.Common.CurrentVersion.targets:
To Reproduce
dotnet new install Avalonia.Templates
dotnet new avalonia.mvvm -o GetStartedApp
dotnet new sln
dotnet sln add GetStartedApp
dotnet restore
Avalonia for VS Code
v0.0.31
Avalonia version
11.0.2
VS Code version
v1.95.1
Relevant log output
The text was updated successfully, but these errors were encountered: