Teamcity + Octopus and umbraco packages - continuous-integration

Currently we are deploying our Umbraco site with teamcity and octopus deploy, having uSync installed to synchronize datatypes, document types etc. between enviroments.
Now im facing our first problem with our CI setup: How do i automatically install/uninstall any installed umbraco packages? If i install a package through the Umbraco interface, locally, and then deploy to our test environment, then i get an error until i install the package manually. This I have to do every time I deploy.
What is the correct way of managing/synchronizing packages between environments when using CI?

The solution to this issue is to either:
1. Install all packages via Nuget
If you install all packages via. Nuget, then teamcity will take care of everything for you when building the solution.
2. Reference the package .dll
If the package is not available as a Nuget package, then download if via Umbraco, find the .dll and move it to another folder in your solution and reference the .dll from there instead.

Related

Nuget packages does not get install properly in freshly installed VS

I have freshly install and update VS Community version 16.10.0 in a freshly installed Windows 10.
Now I have created a small console app and added a unit test project both in .Net Core 3.1 LTS. After that nothing else is done. What I see is that nuget packages for test project is not properly installed although when you check in the nuget package manager, all the package are installed, all of those are installed.
Then I open an old application but the issue is same. Unit test packages are showing with error and same for EF core.
I tried to tweak/build etc. but non fixed the issue.
The issue was due to missing nuget source link in Package Source under NuGet Package Manager.
As soon as I added the package source everything stated to work.
https://api.nuget.org/v3/index.json
The above source link suppose to already be added by default in Package Source but for some unknown reason it was missing. So whatever packages needed such as EFCore and MS Test framework etc. could not be downloaded, hence the problem was.

Using Microsoft.NET.Sdk.Web without Visual Studio?

I am trying to build a dotnet core web app on a build server that has MsBuild, but not Visual Studio, installed. I cannot get around the message error MSB4236: The SDK 'Microsoft.NET.Sdk.Web' specified could not be found.
The command dotnet --info shows Microsoft.NETCore.App 3.1.0 installed, just as on my development machine where the project builds. The contents of C:\Program Files\dotnet\sdk\3.1.100 appear to match between the two machines. Global.json points to the 3.1.0 version.
Is Microsoft.NET.Sdk.Web a separately-installed thing? I see what look like separate packages, now deprecated, on NuGet, and I'm guessing this is now baked into the base .NET SDK?
Where should I be looking for differences to try to find the missing pieces?
Solved the problem by (1) running vs-buildtools installer to put some additional pieces in place, and (2) adding some NuGet packages for web component.

Install nuget packages with permissions

using vs 2017 is it possible to control/permission who can install packages in a solution without using Team Services or other third party tool?
thanks
is it possible to control/permission who can install packages in a solution without using Team Services or other third party tool?
To my knowledge, we could not set permission who can install packages from NuGet gallery without VSTS or third party tool. That because the gallery has not been implemented for this, but you can set up a NuGet server that is accessible via https from the internet, and only allows people who can successfully authenticate to view or download the packages on the server.
You can refer to how to set NuGet.Server and how to Configuring NuGet server to use Authentication for detail info.

'Could not add Microsoft.ProjectOxford.Face' Why can't I add this nuget to my Xamarin.Forms.iOS project?

I am trying to work with facerecognition in xamarin forms by following these guides:
https://blog.xamarin.com/building-smart-apps-with-microsoft-cognitive-services/
https://blog.xamarin.com/adding-facial-recognition-to-your-mobile-apps/
When I add the needed packages: Microsoft.ProjectOxford.Face and Microsoft.ProjectOxford.Common to my shared project it works but once I add them to my iOS project the Microsoft.ProjectOxford.Face does not get added with the following error message:
Could not install package 'Microsoft.ProjectOxford.Face 1.1.0'. You are trying to install this package into a project that targets 'Xamarin.iOS,Version=v1.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
I have tried to install every version from it, all the way from 1.1.0 to 1.2.5.1.
I have the Newtonsoft.Json package installed as well as the Microsoft.Net.Http as well that is required.
Any idea how I can solve this?
You do not need to add this package to your platform projects. Since this i just a wrapper to access the Cognitive Services APIs it will work directly from the shared code.
The only time you need to install a NuGet on both your shared as well as your platform projects is when it leverages platform specific features. Have a look at the Dependency Service which is included in Xamarin.Forms.
That is basically what those NuGets do, they provide you with an interface to use in your shared code, but under the hood functionality is injected from the platform that you are running on.
In this case there is no need to access platform specific features, so you can just install it on your PCL and it should work.

TeamCity Pre-release Nuget of Application Insights Fails

I added the pre-release version of Application Insights to my build. The build works fine in VisualStudio after installing all of the Nuget packages, not quite the "2 clicks" advertised by Microsoft, but not bad in VS2013.
I am now trying to build the website in TeamCity and getting failures indicating Nuget cannot find the package during a pre-compile Nuget Update pass. The error is: Unable to find version '0.8.0-build10578' of package 'Microsoft.ApplicationInsights
I have pre-release selected in the TeamCity configuration and have added the microsoft feed URL to the build's configuration just to be sure (https://www.nuget.org/api/v2/curated-feeds/microsoftdotnet/)
Any ideas where the problem might lie?

Resources