Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MissingMethodException in build process #88

Open
cremor opened this issue Jan 8, 2025 · 2 comments
Open

MissingMethodException in build process #88

cremor opened this issue Jan 8, 2025 · 2 comments

Comments

@cremor
Copy link

cremor commented Jan 8, 2025

I wanted to try Chisel but it's failing the build immediately after adding the package.

Steps to reproduce:

  1. Create a new console application project.
  2. Add the Chisel package.
  3. Notice the MissingMethodException error in the error list.
  4. Try to compile. It also shows the MissingMethodException in the build log.
MissingMethodException: Method not found: 'NuGet.Frameworks.NuGetFramework NuGet.ProjectModel.TargetFrameworkInformation.get_FrameworkName()'.
   at Chisel.LockFileExtensions.ReadPackages(LockFile lockFile, String tfm, String rid, Predicate`1 filter)
   at Chisel.Chisel.ProcessGraph() in /_/src/Chisel/Chisel.cs:line 178
   at Chisel.Chisel.Execute() in /_/src/Chisel/Chisel.cs:line 137

I get the same error from both of your sample projects if I open the Chisel solution itself.
But there I also get additional things:

Unable to read project information for 'TestApp': '[]' is not a valid version string.
Unable to resolve the .NET SDK version as specified in the global.json located at C:\path\to\Chisel\global.json.
Unable to locate the .NET SDK version '8.0.100' as specified by global.json, please check that the specified version is installed.

I don't know if it is related to the MissingMethodException error, but the last two messages seem to indicate that the problem is that I'm using the .NET 9 SDK and don't have the .NET 8 SDK installed.
All .NET SDKs were installed by Visual Studio. I don't manage them myself. I'm using version 17.12.3 of Visual Studio currently.

My dotnet --info output:

.NET SDK:
 Version:           9.0.101
 Commit:            eedb237549
 Workload version:  9.0.100-manifests.4a280210
 MSBuild version:   17.12.12+1cce77968

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.19045
 OS Platform: Windows
 RID:         win-x64
 Base Path:   C:\Program Files\dotnet\sdk\9.0.101\

.NET workloads installed:
 [aspire]
   Installation Source: VS 17.12.35527.113
   Manifest Version:    8.2.2/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.2.2\WorkloadManifest.json
   Install Type:              Msi

Configured to use loose manifests when installing new manifests.

Host:
  Version:      9.0.0
  Architecture: x64
  Commit:       9d5a6a9aa4

.NET SDKs installed:
  6.0.301 [C:\Program Files\dotnet\sdk]
  9.0.101 [C:\Program Files\dotnet\sdk]
@0xced
Copy link
Owner

0xced commented Jan 8, 2025

Are you using the latest version of Chisel, i.e. 1.1.1?

I thought I had fixed this issue, the error you are experiencing is even mentioned in the release notes.

@cremor
Copy link
Author

cremor commented Jan 8, 2025

Yes, I tested with version 1.1.1.
And your sample projects in the current main branch also use that version, but still show the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants