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

DevToys source code failed to compile due to missing ResxHelperGenerator.dll #1224

Open
reinhart1010 opened this issue Jun 14, 2024 · 7 comments
Labels
bug Something isn't working untriaged

Comments

@reinhart1010
Copy link
Contributor

reinhart1010 commented Jun 14, 2024

Current behavior

The current .NET project failed to build with the following logs:

dotnet build /home/shift/projects/devtoys/src/app/dev/platforms/desktop/DevToys.Linux/DevToys.Linux.csproj /property:GenerateFullPaths=true /consoleloggerparameters:NoSummary 
MSBuild version 17.8.5+b5265ef37 for .NET
  Determining projects to restore...
  All projects are up-to-date for restore.
  DevToys.Api -> /home/shift/projects/devtoys/bin/Debug/AnyCPU/DevToys.Api/net8.0/DevToys.Api.dll
CSC : error CS0006: Metadata file '/home/shift/projects/devtoys/src/generators/ResxHelperGenerator/bin/netstandard2.0/ResxHelperGenerator.dll' could not be found [/home/shift/projects/devtoys/src/app/dev/DevToys.Localization/DevToys.Localization.csproj::TargetFramework=net8.0]

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

  1. Make sure to install .NET 8 via Fedora's package manager (dnf install dotnet-sdk-8.0 dotnet-runtime-8.0)
  2. Make sure that the necessary Linux-specific libraries (libadwaita etc.) are also installed
  3. Clone and open the repository in Visual Studio Code
  4. Run bash ./init.sh (without sudo as recommended in CONTRIBUTING.md)
  5. Perform a debug build on either "DevToys CLI" or "DevToys Linux"

Expected behavior

The required DLL should exist to be able to compile for both CLI and GUI app.

Screenshots

No response

Workaround

No response

Affected platforms

Linux

Affected DevToys kind

DevToys (app with GUI), DevToys CLI

DevToys Version

Version: 2.0.0.0 (Commit 211c66f) | .NET Version: 8.0.100 | OS Version: Fedora Linux 40

Relevant Assets/Logs

No response

@reinhart1010 reinhart1010 added bug Something isn't working untriaged labels Jun 14, 2024
@reinhart1010
Copy link
Contributor Author

reinhart1010 commented Jun 14, 2024

I believe this might also be mentioned on microsoft/vscode-dotnettools#245:

I tried re-targeting it, but then I got some build errors about ResxHelperGenerator.dll.

@veler
Copy link
Collaborator

veler commented Jun 14, 2024

Hi,
I hit this issue a few random times myself. I noticed the issue vanishes if I build ResxHelperGenerator project alone first, before building the whole solution. Can you please try that? This is just a workaround that works for me and I don't have a good solution so far.

@reinhart1010
Copy link
Contributor Author

image

Confirmed that the build now works.

I noticed the issue vanishes if I build ResxHelperGenerator project alone first, before building the whole solution.

Should this be documented first as a temporary workaround in CONTRIBUTING.md? Also, why the use of sudo in bash ./init.sh (this will make the project files failed to build due to "insufficient permissions" issue)?

@veler
Copy link
Collaborator

veler commented Jun 15, 2024

Thanks for confirming ! yes, i should probably add this as a workaround.
For the sudo command, I recall having trouble when not using it, because dotnet needed it in order to install some tools. But perhaps I'm not remembering correctly and it's not needed anymore. I will have to test on a fresh VM.

@badcel
Copy link
Contributor

badcel commented Jun 15, 2024

As far as I know you can install dotnet tools on a system and user level. The user level should not need increased privileges and should be preferred from my point of view.

@reinhart1010
Copy link
Contributor Author

As far as I know you can install dotnet tools on a system and user level. The user level should not need increased privileges and should be preferred from my point of view.

Maybe that varies between platforms? I am using the official pre-packaged version of dotnet-tools: dotnet-sdk-8.0 and dotnet-runtime-8.0.

@badcel
Copy link
Contributor

badcel commented Jun 15, 2024

Ah perhaps I misinterpreted global/ local tools: https://learn.microsoft.com/en-us/dotnet/core/tools/dotnet-tool-install

Nevertheless there should be no need for sudo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working untriaged
Projects
None yet
Development

No branches or pull requests

3 participants