I have a bog standard .Net Core ASP MVC page utilising EF and utilising Telerik Components.
The project works great on my machine without fail.
I am however no good at the devops side and don't get the ecosystem that goes around the project. I am trying to build a deployable package, and it appears to go through stages where it says "restoring packages for xxxxx"
it then tries to contact https://nuget.telerik.com/nuget/FindPackagesById()?id= for a whole variety of packages and fails
It then goes through "installing" all of them (I can only assume it tries a different repo), then it fails on some one.
The build then fails with
c:\Program Files\dotnet\sdk\2.1.503\Sdks\Microsoft.NET.SDk\targets\Microsoft.PackageDependencyResolution.targets(198,5): Error NETSDK1004 Assets flie xxxxxx not found. Run a NuGet package restore to generate this file.
This file does not exist though and I have tried numerous solutions without any luck (one being to clear the Nuget Cache - and, I waste 2 hours trying to fix the project after that!).
Can anyone advise the next steps?
Maybe what you're experiencing is something similar to this issue which has been reported to Github dotnet /SDK. And the same cause like this issue.
Not sure what the real msbuild command you use in Devops, but please try adding the /Restore or -restore switch to the command. It could look like: msbuild ...... /Restore
Let me know if it helps:)
Related
I ran into some issues yesterday. All of a sudden I couldn't build my C# solution. At first I thought it was related to us recently mixing project.json files with csproj/package.config files which resulted in some issues with resolving references, but the steps I have taken seem to rule this out.
The build is failing (all 23 projects) with no error messages at all. The build is successful for all other members of my team. The steps I have taken include:
Clean solution
Delete packages folder for solution
Delete bin/obj folders
Delete all temporary/non-mandatory files (.user, .DotSetting, etc)
Delete ASP temporary files (in windows/.net folder)
Delete temporary files in AppData/(Local/Roaming)
Delete temporary files in ~/.nuget
Check out an older guaranteed working branch
Uninstall all VS extensions
Reinstall VS2015
Delete and re-clone the git repo
After all this I tried to create a new solution with an empty class library project. This also fails to build with no error messages.
At this point I am getting more than a little frustrated. It seems like the only thing I haven't tried is to find and delete some obscure registry keys or just reformat the hard drive.
EDIT: I have managed to build a C# project using MSBuild from the command line, although this really doesn't seem to be that significant since the problem obviously isn't in the code since even a new empty project won't build.
I got it working now, and while I am not sure exactly what step did it, the most recent steps I took were:
Reboot
Run a repair on VS2015
Reboot again
Delete all temp files again
Clean solution
Delete packages
Open solution and restore packages via nuget package manager console
Build
All steps were probably not necessary, but I have no idea what the minimal steps required are since I still don't know exactly what broke. I hope the list I established can be of some use to people with similar issues, since at least some of the steps should help.
The kpm pack command needs the runtime for the server - is it possible to install windows runtimes on osx just for the pack and deploy?
Ok, it seems that in order to recognise that the deployment is an aspnet vNext project and to handle that as a 'ProjectK Web Application deployment', you have to make it look like it all came from Visual Studio (or at least that was the only way I managed to get it to work right now)...
I did this by taking an example one from somewhere else...
I took a simple single vnext web project .sln file and changed the project name and project GUID.
I took the .kproj Visual Studio project file and did the same.
There isn't much that needs to be changed - only the name of the project and GUID. It's nice that there isn't any file lists in there so I feel that this might end up as a once-only activity...
I did find that there are some project structure rules that seemed to make it break. You seem to have to have the sln file in the top level folder and a folder underneath for the web project. If there is ONLY a web project then this might seem overkill, but I tried collapsing everything up to the top with the sln file correctly pointing, but that didn't work.
The other thing that you need to make sure you have is a reference to "Microsoft.AspNet.Server.IIS" in the project.json dependencies. Without this, the AspNet.Loader.dll and bin folder don't get deployed.
Apart from that, I am now able to use Sublime Text (or whatever I want on osx), test using "k kestrel", checkin through git and it gets deployed automatically to an azure web site! yippee!
Actually this makes much more sense because it is letting the target decide upon the binaries it needs to satisfy the deployments. Next challenge might be to get it to pull 'my' libraries from a custom NuGet source to get my binary libraries in there and avoid uploading ALL of the source to the website!
Oh - and another tip: Quit kestrel with 'Enter' for a clean quit instead of Z which leaves the port listening but non-functional!
I am trying to use automated builds and deployments to our test IIS web server, however, as of recently, for some reason, the builds are failing with reasons for:
Cannot find Errors.resx
Errors.resx is a file within the project, and it's checked in. Even the Publish option from VS2010 works fine.
Has anyone come across this before?
I had something similar to that, I think I ended up manually patching a value in a resource file in notepad++
see msdn link
I'm trying to build a publish script that doesn't use VS2010 -- I want it to be automated and in powershell (may use Psake soon). The biggest issue that I run into is that a project that will build and publish fine in VS2010 will either not build or not publish via the msbuild command. The closest I can get is (anonymized code):
msbuild /p:OutDir=c:\temp\publish\staging\myProj\myProj_1481\;Configuration=Debug;UseWPP_CopyWebApplication=True;PipelineDependsOnBuild=False C:\TEMP\export\myProj\1481\src\myProj.com\myProj.csproj
That one is failing for a Could not find file error in one of the DLLs. Naturally it publishes fine from VS2010. Is there some sort of recursion that I need to do? I'm burning up quite a bit of time on this one particular portion of my script -- the one part I have the least control over.
Requirements:
if the proj will build in VS2010 I shouldn't need to modify the csproj file -- I don't want to hand this script off to someone else and have them stick in "fix your csproj" land for hours per project
have to be able to script it entirely at the command line
hopefully no additional installs needed
Related:
Trying to Build and Publish Asp.net website from command line using aspnet_compiler (old)
_CopyWebApplication with web.config transformations (didn't fix my issue)
I am managing a build lab and have several products/branches to provide service to and I would like my build machines not to be specialized to any one product/branch.
The scenario I would like to have is that souce and all tools needed to build it are checked into source control and just sync and build with some prep/env setup before hand via script.
This is very doable with Visual Studio and many other tools. Is it possible with Xcode? Has anyone gotten a scenario like this to work?
Some system components may need to be shared. Since this is such an atypical scenario, documentation will not be readily available. I would suggest asking on the Xcode-users mailing list that Apple maintains, as you may get a more certain answer.
I doubt if this possible. There are 2 possible ways I know of.
First, which we also follow in our project:
Source code for all projects in checked in the common repository.
A remote server is configured to point to this repository.
Remote server has XCode pre-installed. A pre-written scripts with steps including workspace cleanup, checkout fresh code, build the code, package the output is already feed into the remote server. Of these XCode related commands are using xcodebuild.
Remote server can be configured in 3 ways: a) Build the source code on every checkin, b) Build the source code triggered by user, c) Scheduled building of the source code.
Build results are emailed to the configured email addresses.
Second way is the continuous integration with MAC OS X server.
Just in case you found out the exact system config you are looking for, please post an answer here to enlighten us as well.