question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error: The "UseDependentUponConvention" parameter is not supported by the "CreateCSharpManifestResourceName" task

See original GitHub issue

Issue Description

OmniSharp.MSBuild.ProjectLoader fails when trying to load a solution that contains a project with reference to another project.

Due to this problem, the IntelliSense does not work!

Looks like this change is not available in the “omnisharp-vscode” built-in MSBuild.

I removed the UseDependentUponConvention="$(EmbeddedResourceUseDependentUponConvention)" lines from the following files:

  • ~/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/15.0/Bin/Microsoft.CSharp.CurrentVersion.targets
  • ~/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/Microsoft.CSharp.CurrentVersion.targets

So, the VS Code loaded the solution with no errors and everything worked!

Steps to Reproduce

  1. Create a solution with 2 projects (with the main project referencing the subproject: <ProjectReference Include="(...).csproj" />);
  2. Open the Visual Studio Code in Ubuntu (>= 18.04);
  3. Check the warning message: Some projects have trouble loading. Please review the output for more details.
  4. Try to use the Go to definion feature.

Expected Behavior

The Visual Studio Code loads the projects with no error and the IntelliSense works.

Actual Behavior

The Visual Studio Code loads the project (with troubles) and the IntelliSense does not work.

Logs

OmniSharp log

(...)
[dbug]: OmniSharp.MSBuild.Discovery.MSBuildLocator
        FAILURE: Could not locate '/(...)/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/Microsoft.Build.Tasks.Core.resources.dll'.

[fail]: OmniSharp.MSBuild.ProjectLoader
        The "UseDependentUponConvention" parameter is not supported by the "CreateCSharpManifestResourceName" task. Verify the parameter exists on the task, and it is a settable public instance property.

[fail]: OmniSharp.MSBuild.ProjectLoader
        The "CreateCSharpManifestResourceName" task could not be initialized with its input parameters. 

[warn]: OmniSharp.MSBuild.ProjectManager
        Failed to load project file '/(...)/workspace/(...)/mySubProject.csproj'.
/(...)/workspace/(...)/mySubProject.csproj
/(...)/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/Microsoft.CSharp.CurrentVersion.targets(110,15): Error: The "UseDependentUponConvention" parameter is not supported by the "CreateCSharpManifestResourceName" task. Verify the parameter exists on the task, and it is a settable public instance property.
/(...)/.vscode/extensions/ms-vscode.csharp-1.21.7/.omnisharp/1.34.7/omnisharp/.msbuild/Current/Bin/Microsoft.CSharp.CurrentVersion.targets(107,9): Error: The "CreateCSharpManifestResourceName" task could not be initialized with its input parameters. 

[info]: OmniSharp.MSBuild.ProjectManager
        Loading project: /(...)/workspace/(...)/myMainProject.csproj

[info]: OmniSharp.MSBuild.ProjectManager
        Successfully loaded project file '/(...)/workspace/(...)/myMainProject.csproj'.

[info]: OmniSharp.MSBuild.ProjectManager
        Adding project '/(...)/workspace/(...)/myMainProject.csproj'

[fail]: OmniSharp.MSBuild.ProjectManager
        Attempted to update project that is not loaded: /(...)/workspace/(...)/mySubProject.csproj

[info]: OmniSharp.MSBuild.ProjectManager
        Update project: myMainProject

[warn]: OmniSharp.MSBuild.ProjectManager
        Ignoring previously failed to load project '/(...)/workspace/(...)/mySubProject.csproj' referenced by 'myMainProject'.

[warn]: OmniSharp.MSBuild.ProjectManager
        Expected project reference /(...)/workspace/(...)/mySubproject.csproj to be already loaded for project myMainProject
(...)

C# log

N/A

Environment information

VSCode version: 1.40.1 C# Extension: 1.21.7

Mono Information OmniSharp using built-in mono
Dotnet Information .NET Core SDK (reflecting any global.json): Version: 3.0.100 Commit: 04339c3a26

Runtime Environment: OS Name: ubuntu OS Version: 19.10 OS Platform: Linux RID: ubuntu.19.10-x64 Base Path: /usr/share/dotnet/sdk/3.0.100/

Host (useful for support): Version: 3.0.0 Commit: 95a0a61858

.NET Core SDKs installed: 3.0.100 [/usr/share/dotnet/sdk]

.NET Core runtimes installed: Microsoft.AspNetCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App] Microsoft.NETCore.App 3.0.0 [/usr/share/dotnet/shared/Microsoft.NETCore.App]

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

Visual Studio Code Extensions
Extension Author Version
cpptools ms-vscode 0.26.2-insiders
csharp ms-vscode 1.21.7
gitlens eamodio 10.2.0
todo-tree Gruntfuggly 0.0.162

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
filipwcommented, Nov 20, 2019

thanks I suspect the problem is related to embedded resources or resx (do you have any?) - not project-to-project references (there are plenty of integration tests for that, and if that didn’t work, then really nothing would work).

on macOS we use msbuild from Mono 6.4.0, it could be that it was built before the commit that added the property. you could try to install mono 6.6.0 preview (https://www.mono-project.com/download/preview/) and see if it helps/

0reactions
evertondornelascommented, Feb 13, 2020

The problem is not reproduced anymore after version 1.21.11.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The "CreateCSharpManifestResourceName" task could not be ...
The “UseDependentUponConvention” parameter is not supported by the “CreateCSharpManifestResourceName” task. Verify the parameter exists on the task, ...
Read more >
C# project build task won't run with error
The "UseDependentUponConvention" parameter is not supported by the "CreateCSharpManifestResourceName" task loaded from assembly: Microsoft.
Read more >
error MSB4064: The “BuildAgentUri” parameter is not ... - MSDN
Verify the parameter exists on the task, and it is a settable public instance ... is not supported by the "WorkspaceItemConverterTask" task.
Read more >
Resolve MSB4064: The "Retries" parameter is not supported ...
MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(130,5): error MSB4063: The "Copy" task could not be ...
Read more >
Resolve MSB4064: The "Retries" parameter is not ...
MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(130,5): error MSB4063: The "Copy" task could not be ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found