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

FileNotFoundException SharpProj.dll for Microsoft.NET.Sdk.Web #52

Open
elliz opened this issue Apr 21, 2023 · 2 comments
Open

FileNotFoundException SharpProj.dll for Microsoft.NET.Sdk.Web #52

elliz opened this issue Apr 21, 2023 · 2 comments

Comments

@elliz
Copy link

elliz commented Apr 21, 2023

We have SharpProj working in unit test and console .net6 projects using Microsoft.NET.Sdk

When we try to run it in an api using Microsoft.NET.Sdk.Web then we get the following error (even though the dll is found in the same place in bin as the console app.

Could not load file or assembly 'SharpProj, Version=9.2000.234.0, Culture=neutral, PublicKeyToken=3a930e679d9a0873'. The system cannot find the file specified.

looking at the output pane in VS can see this:

Exception thrown: 'System.IO.FileNotFoundException' in System.Private.CoreLib.dll

Copying the appropriate dll using post build scripts does not work either, or forcing ijwhost.dll.

@radokostelnik
Copy link

radokostelnik commented Feb 1, 2024

I got the same error. What helped in my case (when starting the project in Visual Studio) was to set the Working directory to the the same as <OutputPath>. Without that, the process looked for ijwhost.dll everywhere in %PATH%, except for the actual folder, where the main .exe was.

@harry-dickson
Copy link

I find that this helps:

  <PropertyGroup>
    <usual>stuff</usual>
    <UseIJWHost>true</UseIJWHost> <!-- this right here! -->
 </PropertyGroup>

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

3 participants