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

Build failure due to Generators #1105

Closed
wisamidris7 opened this issue Mar 30, 2024 · 2 comments
Closed

Build failure due to Generators #1105

wisamidris7 opened this issue Mar 30, 2024 · 2 comments
Labels
bug Something isn't working need more info Further information is requested

Comments

@wisamidris7
Copy link

Current behavior

it does not start from visual studio 2022 it only starts from cli

and this is my visual studio and dotnet info

image

and dotnet --info

.NET SDK:
 Version:           8.0.200
 Commit:            438cab6a9d
 Workload version:  8.0.200-manifests.5638171e

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

.NET workloads installed:
 [maui-windows]
   Installation Source: VS 17.10.34607.79
   Manifest Version:    8.0.6/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maui\8.0.6\WorkloadManifest.json
   Install Type:        FileBased

 [maccatalyst]
   Installation Source: VS 17.10.34607.79
   Manifest Version:    17.2.8022/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.maccatalyst\17.2.8022\WorkloadManifest.json
   Install Type:        FileBased

 [ios]
   Installation Source: VS 17.10.34607.79
   Manifest Version:    17.2.8022/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.ios\17.2.8022\WorkloadManifest.json
   Install Type:        FileBased

 [android]
   Installation Source: VS 17.10.34607.79
   Manifest Version:    34.0.79/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.android\34.0.79\WorkloadManifest.json
   Install Type:        FileBased

 [aspire]
   Installation Source: VS 17.10.34607.79
   Manifest Version:    8.0.0-preview.3.24105.21/8.0.100
   Manifest Path:       C:\Program Files\dotnet\sdk-manifests\8.0.100\microsoft.net.sdk.aspire\8.0.0-preview.3.24105.21\WorkloadManifest.json
   Install Type:        FileBased


Host:
  Version:      8.0.2
  Architecture: x64
  Commit:       1381d5ebd2

.NET SDKs installed:
  8.0.200 [C:\Program Files\dotnet\sdk]

.NET runtimes installed:
  Microsoft.AspNetCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
  Microsoft.NETCore.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
  Microsoft.WindowsDesktop.App 8.0.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]

Other architectures found:
  x86   [C:\Program Files (x86)\dotnet]
    registered at [HKLM\SOFTWARE\dotnet\Setup\InstalledVersions\x86\InstallLocation]

Environment variables:
  Not set

global.json file:
  Not found

Learn more:
  https://aka.ms/dotnet/info

Download .NET:
  https://aka.ms/dotnet/download

How to reproduce it (as minimally and precisely as possible)

I Cloned The Repo And Start It And This Issue Happen

image


1>CSC : error CS0016: Could not write to output file 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.MainWindowViewModel.SearchBoxTextChanged.g.cs' -- 'Could not find a part of the path 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.MainWindowViewModel.SearchBoxTextChanged.g.cs'.'
1>CSC : error CS0016: Could not write to output file 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.MainWindowViewModel.SearchBoxQuerySubmitted.g.cs' -- 'Could not find a part of the path 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.MainWindowViewModel.SearchBoxQuerySubmitted.g.cs'.'
1>CSC : error CS0016: Could not write to output file 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.ToolGroupPageViewModel.ToolSelected.g.cs' -- 'Could not find a part of the path 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.ToolGroupPageViewModel.ToolSelected.g.cs'.'
1>CSC : error CS0016: Could not write to output file 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.ToolPageViewModel.ToggleSelectedMenuItemFavorite.g.cs' -- 'Could not find a part of the path 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.ToolPageViewModel.ToggleSelectedMenuItemFavorite.g.cs'.'

Expected behavior

I was thinking that it will start

Screenshots

No response

Workaround

No response

Affected platforms

Windows

Affected DevToys kind

DevToys (app with GUI)

DevToys Version

i cloned it this week

Relevant Assets/Logs

No response

@wisamidris7 wisamidris7 added bug Something isn't working untriaged labels Mar 30, 2024
@niyari
Copy link
Contributor

niyari commented Mar 31, 2024

917298e
Does it work properly with the previous commit?

@veler
Copy link
Collaborator

veler commented Mar 31, 2024

Hello,
Did you follow the instructions in CONTRIBUTING.md ? It's very important to run .\init.ps1 before trying to build and debug from Visual Studio.

@veler veler added need more info Further information is requested and removed untriaged labels Mar 31, 2024
@veler veler changed the title 4>CSC : error CS0016: Could not write to output file 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.ToolGroupPageViewModel.ToolSelected.g.cs' -- 'Could not find a part of the path 'C:\Users\Administrator\Desktop\mad\DevToys\obj\AnyCPU\DevToys.Business\Debug\net8.0\generated\CommunityToolkit.Mvvm.SourceGenerators\CommunityToolkit.Mvvm.SourceGenerators.RelayCommandGenerator\DevToys.Business.ViewModels.ToolGroupPageViewModel.ToolSelected.g.cs'.' Build failure due to Generators Mar 31, 2024
@veler veler closed this as completed Apr 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need more info Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants