I am currently trying to use MSBuild to build out a test project. For some reason it keeps giving me errors:
Class name : error CS0246: The type or namespace name 'ClosedXML' could not be found (are you missing a using directive or an assembly reference?)
But all the references are there within the project. I even uninstalled\reinstalled the NuGet packages and pushed the changes to my branch and it still will not build. I am new to Bamboo and have tried looking at the documentation and tried to find videos on this, and I haven't found anything.
I got everything up an running, was able to check out and build the sln. The only thing I am noticing is it will execute my exe's and it will succeed, but when I go to run the task again it fails.
I'm sorry! Somehow I missed your last notifications. I'm glad that you were able to fix the problems there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Usually Bamboo tasks are just wrappers for external commands and should give you the same results you get from the terminal, this is why I'm asking you to check this from your terminal first.
You may try navigating to the build working directory right after the failed build and try to run the MSBuild from there.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, @Daniel Santos
Sorry for the late reply, So I was able to get somewhat of the project to build now, found out I had to reload the nuget packages before the build. Also had to install frameworks for it to build projects. Still, on that part, the build keeps erroring out on errors like this:
C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\amd64\Microsoft.Common.CurrentVersion.targets(1179,5): error MSB3644: The reference assemblies for framework ".NETFramework,Version=v4.6.2" were not found. To resolve this, install the SDK or Targeting Pack for this framework version or retarget your application to a version of the framework for which you have the SDK or Targeting Pack installed.
So the main question is for Bamboo to actually build the project with no issues, would I need VS installed on the same server, manually build it on the server to make sure it works and then hook up bamboo to build the project? Currently, I can build the solution perfectly fine on my dev machine
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Let me highlight 2 points that in my opinion usually need more attention:
Please check if the variables that you have in your terminal are the same ones you have when running the build. If the build is running on terminal it should also run in Bamboo, it just need small adjustments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not a 100% sure what you mean by Windows environment variables. I don't know if I explained the issue correctly. The problem we're currently running into is that the build keeps failing on Bamboo because of Assembly references for .NetFramework versions. Off our Bamboo server and on my local machine I am able to check out our Git repository and have no issues building the entire solution. I build it through VS17, but some projects are still targetted for VS15. The difference on the Bamboo server is that we do not have VS installed, so I am wondering if that's what we would need to do, because when you install VS you select multiple frameworks that you need and would get installed. As of right now, we have been having to individually install the frameworks, because of each error we're receiving. Ideally, we don't want to install VS on the server because of space and integrity of the server. I'm not sure to resolve this type of issue if there are any other ways to resolve this, with having to install VS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Daniel Santos was able to pass the assembly problems I actually had to copy my v4.6.2 for the framework over to the server. I am getting this error though:
error MSB3171: Problem generating manifest. Access to the path is denied.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.