dotnet / vscode-csharp

Official C# support for Visual Studio Code
MIT License
2.85k stars 669 forks source link

How to specify the ${OutputPath} in vscode C# extension? #4812

Open zhen8838 opened 2 years ago

zhen8838 commented 2 years ago

Environment data

dotnet --info output:

.NET SDK (反映任何 global.json):
 Version:   5.0.401
 Commit:    4bef5f3dbf

运行时环境:
 OS Name:     Mac OS X
 OS Version:  11.0
 OS Platform: Darwin
 RID:         osx.11.0-x64
 Base Path:   /usr/local/share/dotnet/sdk/5.0.401/

Host (useful for support):
  Version: 5.0.10
  Commit:  e1825b4928

.NET SDKs installed:
  3.1.413 [/usr/local/share/dotnet/sdk]
  5.0.401 [/usr/local/share/dotnet/sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 3.1.19 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.AspNetCore.App 5.0.10 [/usr/local/share/dotnet/shared/Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 3.1.19 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]
  Microsoft.NETCore.App 5.0.10 [/usr/local/share/dotnet/shared/Microsoft.NETCore.App]

To install additional .NET runtimes or SDKs:
  https://aka.ms/dotnet-download

VS Code version:

1.61.0
ee8c7def80afc00dd6e593ef12f37756d8f504ea
arm64

C# Extension version:

v1.23.15

OmniSharp log

Click to expand! Starting OmniSharp server at 10/12/2021, 2:37:29 PM Target: /Users/lisa/Documents/nncase/nncase.sln OmniSharp server started. Path: /Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/run PID: 24499 [info]: OmniSharp.Stdio.Host Starting OmniSharp on MacOS 11.6 (x64) [info]: OmniSharp.Services.DotNetCliService DotNetPath set to dotnet [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator Located 1 MSBuild instance(s) 1: StandAlone 17.0.0 - "/Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/omnisharp/.msbuild/Current/Bin" [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator MSBUILD_EXE_PATH environment variable set to '/Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/omnisharp/.msbuild/Current/Bin/MSBuild.exe' [info]: OmniSharp.MSBuild.Discovery.MSBuildLocator Registered MSBuild instance: StandAlone 17.0.0 - "/Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/omnisharp/.msbuild/Current/Bin" CscToolExe = csc.exe MSBuildToolsPath = /Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/omnisharp/.msbuild/Current/Bin CscToolPath = /Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/omnisharp/.msbuild/Current/Bin/Roslyn BypassFrameworkInstallChecks = true MSBuildExtensionsPath = /Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/omnisharp/.msbuild [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.CSharpFormattingWorkspaceOptionsProvider, Order: 0 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.Completion.CompletionOptionsProvider, Order: 0 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.RenameWorkspaceOptionsProvider, Order: 100 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.ImplementTypeWorkspaceOptionsProvider, Order: 110 [info]: OmniSharp.WorkspaceInitializer Invoking Workspace Options Provider: OmniSharp.Roslyn.CSharp.Services.BlockStructureWorkspaceOptionsProvider, Order: 140 [info]: OmniSharp.Cake.CakeProjectSystem Detecting Cake files in '/Users/lisa/Documents/nncase'. [info]: OmniSharp.Cake.CakeProjectSystem Could not find any Cake files [info]: OmniSharp.MSBuild.ProjectSystem Detecting projects in '/Users/lisa/Documents/nncase/nncase.sln'. [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Cli/Nncase.Cli.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.IR/Nncase.IR.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Importer/Nncase.Importer.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/third_party/tflite/TFLite.Schema.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.EGraph/Nncase.EGraph.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.Script.ScriptProjectSystem Detecting CSX files in '/Users/lisa/Documents/nncase'. [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Cli/Nncase.Cli.csproj [info]: OmniSharp.Script.ScriptProjectSystem Could not find any CSX files [info]: OmniSharp.WorkspaceInitializer Configuration finished. [info]: OmniSharp.Stdio.Host Omnisharp server running using Stdio at location '/Users/lisa/Documents/nncase' on host 24437. Can't find custom attr constructor image: /Users/lisa/Documents/nncase/third_party/tflite/bin/Debug/net5.0/TFLite.Schema.dll mtoken: 0x0a000001 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Cli/Nncase.Cli.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/Users/lisa/Documents/nncase/src/Nncase.Cli/Nncase.Cli.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.IR/Nncase.IR.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.IR/Nncase.IR.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/Users/lisa/Documents/nncase/src/Nncase.IR/Nncase.IR.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Importer/Nncase.Importer.csproj Can't find custom attr constructor image: /Users/lisa/Documents/nncase/third_party/tflite/bin/Debug/net5.0/TFLite.Schema.dll mtoken: 0x0a000001 due to: Cannot resolve dependency to assembly because it has not been preloaded. When using the ReflectionOnly APIs, dependent assemblies must be pre-loaded or loaded on demand through the ReflectionOnlyAssemblyResolve event. [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Importer/Nncase.Importer.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/Users/lisa/Documents/nncase/src/Nncase.Importer/Nncase.Importer.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/third_party/tflite/TFLite.Schema.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/third_party/tflite/TFLite.Schema.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/Users/lisa/Documents/nncase/third_party/tflite/TFLite.Schema.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.EGraph/Nncase.EGraph.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.EGraph/Nncase.EGraph.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/Users/lisa/Documents/nncase/src/Nncase.EGraph/Nncase.EGraph.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Cli/Nncase.Cli.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.IR/Nncase.IR.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Importer/Nncase.Importer.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/third_party/tflite/TFLite.Schema.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.EGraph/Nncase.EGraph.csproj' [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Adding project '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Cli [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Core [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.IR [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Importer [info]: OmniSharp.MSBuild.ProjectManager Update project: TFLite.Schema [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.EGraph [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests Received response for /v2/getcodeactions but could not find request. [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests [info]: OmniSharp.OmniSharpWorkspace Adding analyzer reference: /Users/lisa/.nuget/packages/xunit.analyzers/0.10.0/analyzers/dotnet/cs/xunit.analyzers.dll [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Connected","Payload":null} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"ProtocolVersion","Payload":1} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Connected","Payload":null} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"ProtocolVersion","Payload":1} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10)"}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.44] Starting: Nncase.Tests"}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.59] Finished: Nncase.Tests"}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestExecution.StatsChange","Payload":{"NewTestResults":[{"TestCase":{"Properties":[{"Key":{"Id":"TestCase.FullyQualifiedName","Label":"FullyQualifiedName","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"Nncase.Tests.UnitTest1.Test1"},{"Key":{"Id":"TestCase.ExecutorUri","Label":"Executor Uri","Category":"","Description":"","Attributes":1,"ValueType":"System.Uri"},"Value":"executor://xunit/VsTestRunner2/netcoreapp"},{"Key":{"Id":"TestCase.Source","Label":"Source","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/lisa/Documents/nncase/src/Nncase.Tests/bin/Debug/net5.0/Nncase.Tests.dll"},{"Key":{"Id":"TestCase.CodeFilePath","Label":"File Path","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs"},{"Key":{"Id":"TestCase.DisplayName","Label":"Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"Nncase.Tests.UnitTest1.Test1"},{"Key":{"Id":"TestCase.Id","Label":"Id","Category":"","Description":"","Attributes":1,"ValueType":"System.Guid"},"Value":"b7dd5004-56ea-443d-311a-7d60ef7deabb"},{"Key":{"Id":"TestCase.LineNumber","Label":"Line Number","Category":"","Description":"","Attributes":1,"ValueType":"System.Int32"},"Value":10},{"Key":{"Id":"XunitTestCase","Label":"xUnit.net Test Case","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":":F:Nncase.Tests.UnitTest1:Test1:1:0:ad4d187cc9e84db6bcdaa0639579396f"}]},"Attachments":[],"Messages":[],"Properties":[{"Key":{"Id":"TestResult.Outcome","Label":"Outcome","Category":"","Description":"","Attributes":0,"ValueType":"Microsoft.VisualStudio.TestPlatform.ObjectModel.TestOutcome, Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"},"Value":1},{"Key":{"Id":"TestResult.ErrorMessage","Label":"Error Message","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":null},{"Key":{"Id":"TestResult.ErrorStackTrace","Label":"Error Stack Trace","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":null},{"Key":{"Id":"TestResult.DisplayName","Label":"TestResult Display Name","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"Nncase.Tests.UnitTest1.Test1"},{"Key":{"Id":"TestResult.ComputerName","Label":"Computer Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"localhost"},{"Key":{"Id":"TestResult.Duration","Label":"Duration","Category":"","Description":"","Attributes":0,"ValueType":"System.TimeSpan"},"Value":"00:00:00.0087514"},{"Key":{"Id":"TestResult.StartTime","Label":"Start Time","Category":"","Description":"","Attributes":0,"ValueType":"System.DateTimeOffset"},"Value":"2021-10-12T14:41:43.628073+08:00"},{"Key":{"Id":"TestResult.EndTime","Label":"End Time","Category":"","Description":"","Attributes":0,"ValueType":"System.DateTimeOffset"},"Value":"2021-10-12T14:41:43.628489+08:00"}]}],"TestRunStatistics":{"ExecutedTests":1,"Stats":{"Passed":1}},"ActiveTests":[]}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestExecution.Completed","Payload":{"TestRunCompleteArgs":{"TestRunStatistics":{"ExecutedTests":1,"Stats":{"Passed":1}},"IsCanceled":false,"IsAborted":false,"Error":null,"AttachmentSets":[],"ElapsedTimeInRunningTests":"00:00:00.6152770","Metrics":{}},"LastRunTests":null,"RunAttachments":[],"ExecutorUris":["executor://xunit/VsTestRunner2/netcoreapp"]}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10)"}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.39] Starting: Nncase.Tests"}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestSession.Message","Payload":{"MessageLevel":0,"Message":"[xUnit.net 00:00:00.52] Finished: Nncase.Tests"}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestExecution.StatsChange","Payload":{"NewTestResults":[{"TestCase":{"Properties":[{"Key":{"Id":"TestCase.FullyQualifiedName","Label":"FullyQualifiedName","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"Nncase.Tests.UnitTest1.Test1"},{"Key":{"Id":"TestCase.ExecutorUri","Label":"Executor Uri","Category":"","Description":"","Attributes":1,"ValueType":"System.Uri"},"Value":"executor://xunit/VsTestRunner2/netcoreapp"},{"Key":{"Id":"TestCase.Source","Label":"Source","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/lisa/Documents/nncase/src/Nncase.Tests/bin/Debug/net5.0/Nncase.Tests.dll"},{"Key":{"Id":"TestCase.CodeFilePath","Label":"File Path","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"/Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs"},{"Key":{"Id":"TestCase.DisplayName","Label":"Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"Nncase.Tests.UnitTest1.Test1"},{"Key":{"Id":"TestCase.Id","Label":"Id","Category":"","Description":"","Attributes":1,"ValueType":"System.Guid"},"Value":"b7dd5004-56ea-443d-311a-7d60ef7deabb"},{"Key":{"Id":"TestCase.LineNumber","Label":"Line Number","Category":"","Description":"","Attributes":1,"ValueType":"System.Int32"},"Value":10},{"Key":{"Id":"XunitTestCase","Label":"xUnit.net Test Case","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":":F:Nncase.Tests.UnitTest1:Test1:1:0:45afc19a18ad436ea464c230a1549fa0"}]},"Attachments":[],"Messages":[],"Properties":[{"Key":{"Id":"TestResult.Outcome","Label":"Outcome","Category":"","Description":"","Attributes":0,"ValueType":"Microsoft.VisualStudio.TestPlatform.ObjectModel.TestOutcome, Microsoft.VisualStudio.TestPlatform.ObjectModel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"},"Value":1},{"Key":{"Id":"TestResult.ErrorMessage","Label":"Error Message","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":null},{"Key":{"Id":"TestResult.ErrorStackTrace","Label":"Error Stack Trace","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":null},{"Key":{"Id":"TestResult.DisplayName","Label":"TestResult Display Name","Category":"","Description":"","Attributes":1,"ValueType":"System.String"},"Value":"Nncase.Tests.UnitTest1.Test1"},{"Key":{"Id":"TestResult.ComputerName","Label":"Computer Name","Category":"","Description":"","Attributes":0,"ValueType":"System.String"},"Value":"localhost"},{"Key":{"Id":"TestResult.Duration","Label":"Duration","Category":"","Description":"","Attributes":0,"ValueType":"System.TimeSpan"},"Value":"00:00:00.0083442"},{"Key":{"Id":"TestResult.StartTime","Label":"Start Time","Category":"","Description":"","Attributes":0,"ValueType":"System.DateTimeOffset"},"Value":"2021-10-12T14:41:44.724445+08:00"},{"Key":{"Id":"TestResult.EndTime","Label":"End Time","Category":"","Description":"","Attributes":0,"ValueType":"System.DateTimeOffset"},"Value":"2021-10-12T14:41:44.72482+08:00"}]}],"TestRunStatistics":{"ExecutedTests":1,"Stats":{"Passed":1}},"ActiveTests":[]}} [info]: OmniSharp.DotNetTest.VSTestManager read: {"MessageType":"TestExecution.Completed","Payload":{"TestRunCompleteArgs":{"TestRunStatistics":{"ExecutedTests":1,"Stats":{"Passed":1}},"IsCanceled":false,"IsAborted":false,"Error":null,"AttachmentSets":[],"ElapsedTimeInRunningTests":"00:00:00.5437309","Metrics":{}},"LastRunTests":null,"RunAttachments":[],"ExecutorUris":["executor://xunit/VsTestRunner2/netcoreapp"]}} Received response for /v2/getcodeactions but could not find request. Received response for /completion but could not find request. Received response for /completion/resolve but could not find request. Received response for /completion/resolve but could not find request. Received response for /completion but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/getcodeactions but could not find request. [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests Received response for /v2/blockstructure but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/codestructure but could not find request. [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [warn]: OmniSharp.MSBuild.ProjectLoader The referenced project '../Nncase.EGraph/Nncase.IR.csproj' does not exist. [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj /Users/lisa/.vscode/extensions/ms-dotnettools.csharp-1.23.15/.omnisharp/1.37.15/omnisharp/.msbuild/Current/Bin/Microsoft.Common.CurrentVersion.targets(2079,5): Error: The referenced project '../Nncase.EGraph/Nncase.IR.csproj' does not exist. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests Received response for /v2/getcodeactions but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: /Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs, Line: 13, Column: 20. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: /Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs, Line: 10, Column: 17. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: /Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs, Line: 10, Column: 20. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: /Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs, Line: 10, Column: 20. [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: /Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs, Line: 10, Column: 17. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: /Users/lisa/Documents/nncase/src/Nncase.Tests/UnitTest1.cs, Line: 13, Column: 20. Received response for /v2/getcodeactions but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /completion/resolve but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /completion but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/blockstructure but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /completion/resolve but could not find request. Received response for /completion/resolve but could not find request. Received response for /completion/resolve but could not find request. Received response for /completion/resolve but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/codestructure but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/getcodeactions but could not find request. [warn]: OmniSharp.Roslyn.CSharp.Services.Navigation.FindUsagesService No symbol found. File: /Users/lisa/Documents/nncase/src/Nncase.EGraph/Transform/EGraph.cs, Line: 65, Column: 16. Received response for /v2/gotodefinition but could not find request. Received response for /v2/gotodefinition but could not find request. Received response for /v2/gotodefinition but could not find request. Received response for /v2/getcodeactions but could not find request. Received response for /v2/codestructure but could not find request. [info]: OmniSharp.MSBuild.ProjectManager Queue project update for '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj' [info]: OmniSharp.MSBuild.ProjectManager Loading project: /Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj [info]: OmniSharp.MSBuild.ProjectManager Successfully loaded project file '/Users/lisa/Documents/nncase/src/Nncase.Tests/Nncase.Tests.csproj'. [info]: OmniSharp.MSBuild.ProjectManager Update project: Nncase.Tests

.Net Test log

Click to expand! ----- Running test(s) in context "src/Nncase.Tests/UnitTest1.cs(11,19)" ----- Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Copyright (C) Microsoft Corporation. All rights reserved. Nncase.Tests -> /Users/lisa/Documents/nncase/src/Nncase.Tests/bin/Debug/net5.0/Nncase.Tests.dll Build succeeded. 0 Warning(s) 0 Error(s) Time Elapsed 00:00:04.60 ----- Running test method "Nncase.Tests.UnitTest1.Test1" ----- Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Copyright (C) Microsoft Corporation. All rights reserved. Copyright (C) Microsoft Corporation. All rights reserved. Nncase.Tests -> /Users/lisa/Documents/nncase/src/Nncase.Tests/bin/Debug/net5.0/Nncase.Tests.dll Nncase.Tests -> /Users/lisa/Documents/nncase/src/Nncase.Tests/bin/Debug/net5.0/Nncase.Tests.dll Build succeeded. Build succeeded. 0 Warning(s) 0 Warning(s) 0 Error(s) 0 Error(s) Time Elapsed 00:00:01.52 Time Elapsed 00:00:01.52 [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10) [xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10) [xUnit.net 00:00:00.81] Discovering: Nncase.Tests [xUnit.net 00:00:00.81] Discovering: Nncase.Tests [xUnit.net 00:00:00.94] Discovered: Nncase.Tests [xUnit.net 00:00:00.94] Discovered: Nncase.Tests [xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10) [xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10) [xUnit.net 00:00:00.47] Discovering: Nncase.Tests [xUnit.net 00:00:00.47] Discovering: Nncase.Tests [xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10) [xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10) [xUnit.net 00:00:00.58] Discovered: Nncase.Tests [xUnit.net 00:00:00.58] Discovered: Nncase.Tests [xUnit.net 00:00:00.44] Starting: Nncase.Tests [xUnit.net 00:00:00.44] Starting: Nncase.Tests [xUnit.net 00:00:00.59] Finished: Nncase.Tests [xUnit.net 00:00:00.59] Finished: Nncase.Tests ----- Test Execution Summary ----- Nncase.Tests.UnitTest1.Test1: Outcome: Passed Total tests: 1. Passed: 1. Failed: 0. Skipped: 0 [xUnit.net 00:00:00.01] xUnit.net VSTest Adapter v2.4.3+1b45f5407b (64-bit .NET 5.0.10) [xUnit.net 00:00:00.39] Starting: Nncase.Tests [xUnit.net 00:00:00.52] Finished: Nncase.Tests ----- Test Execution Summary ----- Nncase.Tests.UnitTest1.Test1: Outcome: Passed Total tests: 1. Passed: 1. Failed: 0. Skipped: 0 ----- Running test method "Nncase.Tests.UnitTestEGraph.TestAddExpr" ----- Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Copyright (C) Microsoft Corporation. All rights reserved. /usr/local/share/dotnet/sdk/5.0.401/Microsoft.CSharp.CurrentVersion.targets(130,9): warning MSB3884: Could not find rule set file "/tools/StyleCopAnalyzers.ruleset". [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] /Users/lisa/Documents/nncase/src/Nncase.Core/BFloat16.cs(77,30): warning CS8765: 参数“obj”类型的为 Null 性与重写成员不匹配(可能是由于为 Null 性特性)。 [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] CSC : error CS0016: 未能写入输出文件“/Nncase.Core.xml”--“Read-only file system” [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] Build FAILED. /usr/local/share/dotnet/sdk/5.0.401/Microsoft.CSharp.CurrentVersion.targets(130,9): warning MSB3884: Could not find rule set file "/tools/StyleCopAnalyzers.ruleset". [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] /Users/lisa/Documents/nncase/src/Nncase.Core/BFloat16.cs(77,30): warning CS8765: 参数“obj”类型的为 Null 性与重写成员不匹配(可能是由于为 Null 性特性)。 [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] CSC : error CS0016: 未能写入输出文件“/Nncase.Core.xml”--“Read-only file system” [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] 2 Warning(s) 1 Error(s) Time Elapsed 00:00:07.60 ----- Running test method "Nncase.Tests.UnitTestEGraph.TestAddExpr" ----- Microsoft (R) Build Engine version 16.11.0+0538acc04 for .NET Copyright (C) Microsoft Corporation. All rights reserved. /usr/local/share/dotnet/sdk/5.0.401/Microsoft.CSharp.CurrentVersion.targets(130,9): warning MSB3884: Could not find rule set file "/tools/StyleCopAnalyzers.ruleset". [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] /Users/lisa/Documents/nncase/src/Nncase.Core/BFloat16.cs(77,30): warning CS8765: Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes). [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] CSC : error CS0016: Could not write to output file '/Nncase.Core.xml' -- 'Read-only file system' [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] Build FAILED. /usr/local/share/dotnet/sdk/5.0.401/Microsoft.CSharp.CurrentVersion.targets(130,9): warning MSB3884: Could not find rule set file "/tools/StyleCopAnalyzers.ruleset". [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] /Users/lisa/Documents/nncase/src/Nncase.Core/BFloat16.cs(77,30): warning CS8765: Nullability of type of parameter 'obj' doesn't match overridden member (possibly because of nullability attributes). [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] CSC : error CS0016: Could not write to output file '/Nncase.Core.xml' -- 'Read-only file system' [/Users/lisa/Documents/nncase/src/Nncase.Core/Nncase.Core.csproj] 2 Warning(s) 1 Error(s) Time Elapsed 00:00:07.33

Expected behavior

I use the vscode but my colleague uses visual studio, and the project generated by vsiual studio, the csproj file contains a $(OutputPath) variable like this:

<DocumentationFile>$(OutputPath)/Nncase.Cli.xml</DocumentationFile>

I can use dotnet build -o obj/Debug/net5.0 set the variable in command line, but when I click the C# run test it can not set the variable.

Steps to reproduce and Actual behavior

https://user-images.githubusercontent.com/26156999/136913625-ef5de617-b115-40a0-a8a1-c19d7c55d611.mov

zhen8838 commented 2 years ago

And how to change the default omnisharp build output dir? when I remove the variable usage in csproj, I found the run test will generate program in bin/Debug/net5.0, but the omnisharp default output dir is bin/Debug/net5.0 😂 截屏2021-10-12 15 54 56

nohwnd commented 2 years ago

Can you post that csproj file? Make sure to remove all details that you don't want to share publicly.

zhen8838 commented 2 years ago

https://github.com/kendryte/nncase/tree/feature/rebuild-ir

project is nncase.sln

JoeRobich commented 2 years ago

@zhen8838 Just wanted to share this documentation - https://docs.microsoft.com/en-us/visualstudio/msbuild/common-msbuild-project-properties?view=vs-2019.

$(OutputPath) is a MSBuild project property and by default is set to $(BaseOutputPath)\$(Configuration)\. $(BaseOutputPath) is the value bin by default and $(Configuration) will be Debug or Release depending on what type of build is being run.

You can change these values in your .csproj file individually or for your entire build by configuring it in a Directory.Build.props file that is in the same folder as your .sln. See https://docs.microsoft.com/en-us/visualstudio/msbuild/customize-your-build?view=vs-2019 for more details.

When you first open you solution in VS Code it should prompt you to generate build asset files. If this dialog has been dismissed and told to 'Don't Show Again', you can invoke it manually by running the ".NET: Generate Assets for Build and Debug" command. image

The generated '.vscode/tasks.json' will include tasks to build your project. You can adjust the arguments to include specifying the -o option if you desire.

Build are also performed when you run Tests. However, these builds currently use the values that are read from you build files and there is no configuration options for them at this time.

zhen8838 commented 2 years ago

@JoeRobich Thanks for your reply. I generate the assert and modify the task.json build item, but the test still can't build(the test build not use the task.json build). I don't know which path build files will be read when running Tests? Can you tell me how to set the build args to make run_test can work? Thanks!

https://user-images.githubusercontent.com/26156999/137255206-728a2a87-abd9-42e8-ac32-ca6e1b5f09cc.mov

JoeRobich commented 2 years ago

Can you tell me how to set the build args to make run_test can work? Thanks!

There are currently no configuration options for the build used when starting tests. You could update the .csproj files or add a Directory.Build.props as mentioned above to redirect $(OutputPath) for all builds. Sorry this is not ideal.

zhen8838 commented 2 years ago

Ok, Thanks