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

Could not load file or assembly '/usr/bin/Microsoft.Build.dll' or one of its dependencies #15

Open
ghost opened this issue Sep 3, 2019 · 2 comments

Comments

@ghost
Copy link

ghost commented Sep 3, 2019

Hi ,

I am trying to build mvc dotnet solution file from ubuntu but every time i am getting only errors as below

i have used these commands to install msbuild and nuget
[ apt-get install -y nuget mono-devel mono-xbuild ]

$ nuget restore SeleniumNUnitParam.sln

MSBuild auto-detection: using msbuild version '' from '/usr/bin'.
Error parsing solution file at /root/SeleniumNUnitParam/SeleniumNUnitParam.sln: Could not load file or assembly '/usr/bin/Microsoft.Build.dll' or one of its dependencies

$ xbuild SeleniumNUnitParam.sln

Target EnsureNuGetPackageBuildImports:
/root/SeleniumNUnitParam/SeleniumNUnitParam/SeleniumNUnitParam.csproj: error : This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is ../packages/Selenium.WebDriver.ChromeDriver.2.27.0/build/Selenium.WebDriver.ChromeDriver.targets.

@ostroffjh
Copy link

Is there any solution? I suspect this is because some piece of dotnet (I have no idea which) is installed under /usr/bin and looking for the rest of itself in the same place. I think whatever that is "/usr/bin/msbuild" should not have been copied there but only a symlink created. (I have a similar problem with a completely different project.)

@ooham
Copy link

ooham commented Sep 12, 2020

I'm trying to create a scripted pipeline using jenkins for .net application for instance I'm taking the code from https://github.com/executeautomation/SeleniumNUnitParam and trying to create .msi package. I'm just able to checkout the code but later the build steps are failing stating the file ,directory or volume label syntax is incorrect. I have Installed msbuild,git and nuget plugin. Below is my code

node('new'){
stage('Checkout SCM'){
bat 'git config --global http.sslverify false --Replace-all'
checkout scm
echo 'COMPLETE: Checkout SCM'
}
stage('Restore Nuget'){
bat 'C:/tool:/nuget.exe restore SeleniumNUnitParam/SeleniumNUnitParam.csproj'
}
stage('Build'){
bat "" ${tool 'MSBUILD'}" SeleniumNUnitParam/SeleniumNUnitParam.csproj
/p:configuration=Release /p:Platform="Any CPU" /p:ProductVersion=1.0.0.${env.BUILD_NUMBER}"
}

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