Giter Club home page Giter Club logo

teamcity-dotnet-plugin's Introduction

.NET Plugins for TeamCity

official JetBrains project License Build

Plugins

.NET plugin

The TeamCity .NET plugin provides support for .NET tools in TeamCity. It simplifies building Windows and cross-platform applications that use .NET frameworks and libraries.

Features

The plugin provides the following features:

Compatibility

The plugin is compatible with

.NET CLI toolkit

To use the dotnet build runner, install .NET CLI and add the .NET CLI tools path to the PATH environment variable.

You can also configure the DOTNET_HOME environment variable for your TeamCity build agent user, for instance:

DOTNET_HOME=C:\Program Files\dotnet\

Known issues

Tests might not be reported correctly for .NET Core xunit test projects when logging verbosity levels is minimal or quiet because of issue.

C# Script runner

Features

Compatibility

The plugin is compatible with

Inspections

The Inspections (ReSharper) build runner allows you to use the benefits of the JetBrains ReSharper code quality analysis feature right in TeamCity, with the help of the bundled JetBrains ReSharper Command Line Tools. You can use the tools within TeamCity without any additional ReSharper license. ReSharper analyzes your C#, VB.NET, XAML, XML, ASP.NET, ASP.NET MVC, JavaScript, HTML, CSS code, and allows you to:

  • Find probable bugs
  • Eliminate errors and code smells
  • Detect performance issues
  • Improve the code structure and maintainability
  • Ensure the code conforms to guidelines, standards and specifications

Duplicates Finder

The Duplicates finder (ReSharper) build runner, based on ReSharper Command Line Tools, is intended to catch similar code fragments and provide a report on the discovered repetitive blocks of C# and Visual Basic .NET code in Visual Studio 2003, 2005, 2008, 2010, 2012, 2013, and 2015 solutions.

Additional Resources

Build

This project uses gradle as a build system. You can easily open it in IntelliJ IDEA or Eclipse.

Report and Track Issues

Please use our YouTrack to report related issues.

teamcity-dotnet-plugin's People

Contributors

andrefmrocha avatar blacknikomo avatar boris-yakhno avatar burnasheva avatar dmitry-treskunov avatar dtretyakov avatar hypnosphi avatar ilyafomenko avatar julia-alexandrova avatar kim-vitaliy avatar kir avatar lesley29 avatar madlexa avatar mchechulnikov avatar mikekidya avatar nikolaypianikov avatar orybak avatar pavel-krizskii avatar pavelsher avatar semyonnaumov avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teamcity-dotnet-plugin's Issues

dotnet msbuild

Support advanced set of capabilities using dotnet msbuild

dotnet clean

How do I run dotnet clean? Or any custom command for that matter?

Precompile and Prepublish scripts

Is there any way that the publish run the following script:

"prepublish": ["dotnet bundle"],
or
"precompile": "dotnet bundle",

I really need to run "dotnet bundle" in order to generate all the minified files

Unable to download plugin

Hello there. I cannot seem to download the TeamCity plugin. Is there another link that might work? Here is the link that I am using to try and download: https://plugins.jetbrains.com/plugin/9190--net-core-support
then scroll down and click [Download] and then I get redirected to this url with the following message:
https://d9ernfkkvx1zk.cloudfront.net/9190/29587/external?updateId=29587&pluginId=9190&pr=teamcity

403 Forbidden

Code: AccessDenied
Message: Access Denied
RequestId: B27FF07AFC64432A
HostId: lVVVOmXIr8pWfMalO/7qCkxXyvUpA/Fnc5VQBmjoyBREHZ67OpJqHgmiAo0fGG1sd2oq7r9nMBw=

Any help would be greatly appreciated

Properly handle all dotnet cli versions

Different .net core sdk tools report version in different format:

Normal sample:

dotnet --version
1.0.0-preview2-003133

Sample, where --version output same as for --info:

dotnet --version
.NET Command Line Tools (1.0.0-beta-001598)

Product Information:
 Version:     1.0.0-beta-001598
 Commit Sha:  7582649f88

Runtime Environment:
 OS Name:     Windows
 OS Version:  10.0.14393
 OS Platform: Windows
 Runtime Id:  win10-x64

dotnet restore

I have a private NuGet server. I can restore packages from VS and via command line from my package source.

However, what I run in team city, I get this error:

[06:56:44][Step 1/3] Restoring packages for C:\TeamCity\buildAgent\work\279c3e8f3593f219\src\myproject\app.csproj...
[06:56:45][Step 1/3] Retrying 'FindPackagesByIdAsyncCore' for source 'http://appshard1/nuget/FindPackagesById()?id='App.Core''.
[06:56:45][Step 1/3] Response status code does not indicate success: 504 (Unknown Host).
[06:56:45][Step 1/3] Retrying 'FindPackagesByIdAsyncCore' for source 'http://appshard1/nuget/FindPackagesById()?id='App.Core.ViewModel''.
[06:56:45][Step 1/3] Response status code does not indicate success: 504 (Unknown Host).
[06:56:45][Step 1/3] Retrying 'FindPackagesByIdAsyncCore' for source 'http://appshard1/nuget/FindPackagesById()?id='App.Core.Identity''.
[06:56:45][Step 1/3] Response status code does not indicate success: 504 (Unknown Host).

when I enter this:

http://appshard1/nuget/FindPackagesById()?id='App.Core.ViewModel'

in the browser directly it works just fine.

I'm using:
dotnet SDK 1.0.3
TeamCity dotnet Plugin: 0.8.1

Thanks.

Error when installing plugin in TeamCity

Hi,

I'm trying to setup a .NET Core project in TeamCity and came across this plugin to facilitate my work in configuring a build. So I downloaded the plugin, copied it into the TeamCity datadirectory/plugins, rebooted the server and it booted with the following error:

[2017-09-05 13:10:42,960]  ERROR - gins.spring.SpringPluginLoader - Failed to initialize spring context for plugin dotnetcore 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [jetbrains/buildServer/dotnet/CachingConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "org.springframework.cache.guava.GuavaCacheManager.setCacheBuilder(Lcom/google/common/cache/CacheBuilder;)V" the class loader (instance of jetbrains/buildServer/plugins/classLoaders/PluginStandaloneClassLoader) of the current class, jetbrains/buildServer/dotnet/CachingConfig, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the method's defining class, org/springframework/cache/guava/GuavaCacheManager, have different Class objects for the type com/google/common/cache/CacheBuilder used in the signature
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
	at jetbrains.buildServer.plugins.spring.SpringPluginLoader.pluginClassesLoaded(SpringPluginLoader.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:121)
	at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:68)
	at com.sun.proxy.$Proxy16.pluginClassesLoaded(Unknown Source)
	at jetbrains.buildServer.plugins.PluginManagerImpl$2.visitPlugin(PluginManagerImpl.java:140)
	at jetbrains.buildServer.plugins.PluginsCollection$6.run(PluginsCollection.java:257)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "org.springframework.cache.guava.GuavaCacheManager.setCacheBuilder(Lcom/google/common/cache/CacheBuilder;)V" the class loader (instance of jetbrains/buildServer/plugins/classLoaders/PluginStandaloneClassLoader) of the current class, jetbrains/buildServer/dotnet/CachingConfig, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the method's defining class, org/springframework/cache/guava/GuavaCacheManager, have different Class objects for the type com/google/common/cache/CacheBuilder used in the signature
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
	at jetbrains.buildServer.spring.InstantiationStrategySelector$1.instantiate(InstantiationStrategySelector.java:90)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
	... 26 more
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.springframework.cache.guava.GuavaCacheManager.setCacheBuilder(Lcom/google/common/cache/CacheBuilder;)V" the class loader (instance of jetbrains/buildServer/plugins/classLoaders/PluginStandaloneClassLoader) of the current class, jetbrains/buildServer/dotnet/CachingConfig, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the method's defining class, org/springframework/cache/guava/GuavaCacheManager, have different Class objects for the type com/google/common/cache/CacheBuilder used in the signature
	at jetbrains.buildServer.dotnet.CachingConfig.cacheManager(CachingConfig.kt:17)
	at jetbrains.buildServer.dotnet.CachingConfig$$EnhancerBySpringCGLIB$$44808dee.CGLIB$cacheManager$0(<generated>)
	at jetbrains.buildServer.dotnet.CachingConfig$$EnhancerBySpringCGLIB$$44808dee$$FastClassBySpringCGLIB$$f6a0cda1.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
	at jetbrains.buildServer.dotnet.CachingConfig$$EnhancerBySpringCGLIB$$44808dee.cacheManager(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
	... 28 more

Both server and its agents are running an embedded version of Java

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) Client VM (build 25.121-b13, mixed mode)

Is there anything I'm missing? I have the dotnet CLI tools installed and didn't find any other prerequisites to get this working.

Thanks in advance,
Luk

httpauth for dotnet restore from TeamCity nuget feed

Hi, I do a dotnet restore before my sln is built, and it looks like it wants to nuget restore from it which is fine except I am not sure how to pass in my teamcity credentials as they do not seem to be automatically passed (I am using teamcity as a nuget server). I ended up using guestAuth but prefer httpAuth. Any tips?

NullPointerException in TestArgumentsProvider

Greetings,

I believe there's a bug in the TestArgumentsProvider.

image

When I don't supply a value for the temp directory in the dotnet test command (pictured above), I get a Null Pointer Exception. Here's the (abbreviated) stacktrace:

Step 20/25: Run Unit Tests (.NET Core (dotnet)) [13:35:36][Step 20/25] Failed to start build runner 'dotnet' [13:35:36] [Step 20/25] kotlin.KotlinNullPointerException at jetbrains.buildServer.dotnet.dotnet.TestArgumentsProvider.getArguments(TestArgumentsProvider.kt:57) at jetbrains.buildServer.dotnet.DotnetRunnerBuildService.makeProgramCommandLine(DotnetRunnerBuildService.kt:43) at jetbrains.buildServer.agent.runner2.SingleCommandLineBuildSessionAdapter.makeProgramCommandLine(SingleCommandLineBuildSessionAdapter.java:54) at jetbrains.buildServer.agent.runner2.GenericCommandLineBuildProcess.executeProcess(GenericCommandLineBuildProcess.java:78) at jetbrains.buildServer.agent.runner2.GenericCommandLineBuildProcess.waitFor(GenericCommandLineBuildProcess.java:260) ... <snip> ... at java.lang.Thread.run(Thread.java:745)

I think Line 55 of TestArgumentsProvider.kt should be changed from:

if (!outputValue.isNullOrBlank()) {

To:

if (!tempValue.isNullOrBlank()) {

Regards,
Ethan

test command not return tests results

test command not return tests results to Overiew tab, for example return message "Process exited with code 1" when some of test fails:
teamcity

when all test pass, not added any information about test results.

Tested with:
TeamCity Professional 10.0.1 (build 42078)

Automatically increment patch number of the package

I am trying to use TeamCity as nuget server. When i run dotnet pack step i want to increment patch version automatically. I think currently it doesn't support.

I could only see that there is Verison Suffix field which replaces * with the version. I think * represents release version rather patch version. Is it possible to update patch. If not can you please add another field or modify current logic to increment patch.

Publishing Nuget package to internal feed

I've added a dotnet pack build step to my project, which builds the Nuget packages. In other projects, when you use the Nuget pack integration (for classic .NET), these packages are picked up automatically and published to the internal feed.

How would this work with this plugin?

NuGet restore is looking in user directory

I've installed the plugin and I'm trying to build my project with the .NET Core (dotnet) runner. It's failing right away because it's looking for a dll from a package in my users directory.

[09:04:13][Step 2/2] Starting: "C:\Program Files\dotnet\bin\dotnet.exe" build LevApi
[09:04:13][Step 2/2] in directory: E:\TeamCity\buildAgent4\work\b62b6825dfad2144
[09:04:14][Step 2/2] Could not find a part of the path 'C:\Windows\system32\config\systemprofile\.nuget\packages\System.Numerics.Vectors\4.1.1-beta-23516\lib\portable-net45+win8\System.Numerics.Vectors.dll'.
[09:04:14][Step 2/2] Process exited with code 1
[09:04:14][Step 2/2] Step Build LevApi (.NET Core (dotnet)) failed

This is build with a build agent running under Local System account. I have another build agent running under my account, when I use that it's trying to find the dll in my users directory.

[Step 2/2] Could not find a part of the path 'C:\Users\dfpsb\.nuget\packages\System.Numerics.Vectors\4.1.1-beta-23516\lib\portable-net45+win8\System.Numerics.Vectors.dll'.

I can build other non-Core .NET projects just fine.
I'm at a loss if the problem is with NuGet 3.4.3, the ASP.NET Core installation or the plugin.

I'm using the latest runtime:

C:\Windows\system32>dnvm list

Active Version           Runtime Architecture Location                                                                            Alias
------ -------           ------- ------------ --------                                                                            -----
  *    1.0.0-rc1-update2 clr     x86          C:\Users\dfpsb\.dnx\runtimes\dnx-clr-win-x86.1.0.0-rc1-update2\bin\dnx.exe\runtimes default

Invalid parameter escaping when passing msbuild arguments

If we trying to pass additional msbuild arguments like /p:ExternalToolsPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External" it wraps it into "/p:ExternalToolsPath="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Web\External"".

NuGet restore: Unable to load the service index for source

While running the dotnet restore step I get the error below:

[Step 1/2] Starting: "C:\Program Files\dotnet\dotnet.exe" restore
[Step 1/2] in directory: C:\TeamCity\buildAgent\work\279c3e8f3593f219
[Step 1/2] log : Restoring packages for C:\TeamCity\buildAgent\work\279c3e8f3593f219\src\App\project.json...
[Step 1/2] log : Restoring packages for C:\TeamCity\buildAgent\work\279c3e8f3593f219\src\App\project.json...
[Step 1/2] error: Unable to load the service index for source https://api.nuget.org/v3/index.json.
[Step 1/2] error: An error occurred while sending the request.
[Step 1/2] error: A connection with the server could not be established

I have enabled and installed Nuget Server/tool.

How do I fix this?

Add ability to install .NET Core CLI

I really like this plugin, looks like a great way forward for building DNX apps in TeamCity.

The first hurdle I ran into is that you have to install DNU/DNX as the user that the agent is running under. It would remove so much friction if TeamCity could take care of this - either by letting users specify a custom version (the same way they can specify which NuGet executables to use) or just downloading and installing it for them.

To get it to work for ASP.NET 5 RC1, I had to:

  • Make TeamCity build agent run as a custom user
  • Log in to Windows as that custom user
  • Install the command line DNVM
  • Run dnvm install latest
  • Run dnvm upgrade
  • Restart TeamCity build agent to pick up the environment variable changes

Teamcity Download Needs Update

I have downloaded the plugin from the Teamcity plugin site and it is not allowing me to build with dotnet by pointing at a .csproj file. I see in your comments that you have that you have added that feature. Can you update the link on the Teamcity site, or provide instructions on how to compile your source into a plugin?

Thanks,

Jayson

dotnet vstest

Any plans to add support for the vstest command? It would make it easier to run multiple test projects in one build step (dotnet test does not support this currently).

Plugin fails to install on Teamcity 2017.1.3

server version: TeamCity Enterprise 2017.1.3 (build 46961)
plug-in version: SNAPSHOT-20170904152901

exception:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheManager' defined in class path resource [jetbrains/buildServer/dotnet/CachingConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "org.springframework.cache.guava.GuavaCacheManager.setCacheBuilder(Lcom/google/common/cache/CacheBuilder;)V" the class loader (instance of jetbrains/buildServer/plugins/classLoaders/PluginStandaloneClassLoader) of the current class, jetbrains/buildServer/dotnet/CachingConfig, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the method's defining class, org/springframework/cache/guava/GuavaCacheManager, have different Class objects for the type com/google/common/cache/CacheBuilder used in the signature 
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1123) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1018) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:510) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) 
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) 
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) 
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) 
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772) 
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839) 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) 
at jetbrains.buildServer.plugins.spring.SpringPluginLoader.pluginClassesLoaded(SpringPluginLoader.java:102) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at jetbrains.buildServer.util.EventDispatcher.dispatch(EventDispatcher.java:121) 
at jetbrains.buildServer.util.EventDispatcher$2.invoke(EventDispatcher.java:68) 
at com.sun.proxy.$Proxy16.pluginClassesLoaded(Unknown Source) 
at jetbrains.buildServer.plugins.PluginManagerImpl$2.visitPlugin(PluginManagerImpl.java:140) 
at jetbrains.buildServer.plugins.PluginsCollection$6.run(PluginsCollection.java:257) 
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) 
at java.util.concurrent.FutureTask.run(FutureTask.java:266) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
at java.lang.Thread.run(Thread.java:745) 
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.CacheManager]: Factory method 'cacheManager' threw exception; nested exception is java.lang.LinkageError: loader constraint violation: when resolving method "org.springframework.cache.guava.GuavaCacheManager.setCacheBuilder(Lcom/google/common/cache/CacheBuilder;)V" the class loader (instance of jetbrains/buildServer/plugins/classLoaders/PluginStandaloneClassLoader) of the current class, jetbrains/buildServer/dotnet/CachingConfig, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the method's defining class, org/springframework/cache/guava/GuavaCacheManager, have different Class objects for the type com/google/common/cache/CacheBuilder used in the signature 
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189) 
at jetbrains.buildServer.spring.InstantiationStrategySelector$1.instantiate(InstantiationStrategySelector.java:90) 
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588) 
... 26 more 
Caused by: java.lang.LinkageError: loader constraint violation: when resolving method "org.springframework.cache.guava.GuavaCacheManager.setCacheBuilder(Lcom/google/common/cache/CacheBuilder;)V" the class loader (instance of jetbrains/buildServer/plugins/classLoaders/PluginStandaloneClassLoader) of the current class, jetbrains/buildServer/dotnet/CachingConfig, and the class loader (instance of org/apache/catalina/loader/WebappClassLoader) for the method's defining class, org/springframework/cache/guava/GuavaCacheManager, have different Class objects for the type com/google/common/cache/CacheBuilder used in the signature 
at jetbrains.buildServer.dotnet.CachingConfig.cacheManager(CachingConfig.kt:17) 
at jetbrains.buildServer.dotnet.CachingConfig$$EnhancerBySpringCGLIB$$bac48815.CGLIB$cacheManager$0(<generated>) 
at jetbrains.buildServer.dotnet.CachingConfig$$EnhancerBySpringCGLIB$$bac48815$$FastClassBySpringCGLIB$$37275d31.invoke(<generated>) 
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) 
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356) 
at jetbrains.buildServer.dotnet.CachingConfig$$EnhancerBySpringCGLIB$$bac48815.cacheManager(<generated>) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:498) 
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162) 
... 28 more```

Setting up Dependent Projects in the Build

The build is now working for stand alone projects, but how do I go about setting up the build in such a way where dependencies are handled? For instance, I have a project called "Location", which has a dependency on another project called "Google". That's defined in my project.json file:

"dependencies": {
"Microsoft.Net.Http": "2.2.22",
"Newtonsoft.Json": "6.0.6",
"Google" : "1.0.0"
}

How do I make sure that the build process sees Google and knows where it is?

Issue when using code coverage

I try to use the code coverage and my tests are not even run as I have an error at the very beginning of the step. Note the very strange name of the .dotcover file which indeed has a funny character in the file system of the server. I've run it several times with different agents, getting systematically the same pb.

[Step 5/8] Starting: C:\TeamCity\buildAgent\tools\JetBrains.dotCover.CommandLineTools.2017.2.20170824.141024\dotCover.exe cover C:\\TeamCity\\buildAgent\\temp\\buildTmp\\239a3a8aafd34dc391a4b5651ad7913f.dot�over /ReturnTargetExitCode /NoCheckForUpdates
[18:24:08]	[Step 5/8] in directory: C:\TeamCity\buildAgent\work\36ee9562cad46127
[18:24:08]	[Step 5/8] JetBrains dotCover Console Runner 2017.2. Build 109.0.20170824.140432
[18:24:08]	[Step 5/8] Copyright (c) 2009-2017 JetBrains s.r.o. All rights reserved.
[18:24:08]	[Step 5/8] Failed to parse xml parameters
[18:24:08]	[Step 5/8] Could not find file 'C:\TeamCity\buildAgent\temp\buildTmp\239a3a8aafd34dc391a4b5651ad7913f.dot%EF%BF%BDover'.
[18:24:08]	[Step 5/8] Type 'dotCover help' for usage.
[18:24:08]	[Step 5/8] Process exited with code -1

Context:

  • TC: 2017.1.2 (build 46812)
  • dotCover: 2017.2.20170824.141024
  • dotnetcore plugin: SNAPSHOT-20170905203724

Does not work properly with publish-iis tool

Project.json

  "scripts": {
    "postpublish": "dotnet publish-iis --publish-folder %publish:OutputPath% --framework %publish:FullTargetFramework%"
  },

Settings
Projects: src/foo
Configuration: Release
output: published-app

generats command: "C:\Program Files\dotnet\dotnet.exe" publish src/foo --configuration Release --output published-app

Expected:
tranformation of web.config

Actual:
Could not find a part of the path 'D:\TeamCity\buildAgent\work\c0b1debfe88f0b47\src\foo\published-app\web.config'.

Works if you run build step as command line with command:

cd src\pixie
dotnet publish -o ..\..\published-app -c Release

restore multiple sources

It would be useful to allow a space delimiter like other fields or multi-line like the NuGet Installer runner for multiple sources. The documentation states you can enter source multiple times.

"-s, --source [SOURCE]

Specifies a source to use during the restore operation. This overrides all of the sources specified in the NuGet.config file(s). Multiple sources can be provided by specifying this option multiple times."

Run tests inside their project directory

The plugin in its current state runs tests from outside the project directory - this can cause issues with tests which access file resources, assuming that the current directory is the project.

In other words, rather than doing dotnet test test/myproj, it would be better to do cd test/myproj; dotnet test.

Apply to multiple projects

It would be great if this plugin could run dotnet commands on multiple projects, similar to how the Nuget plugin works. E.g. I would like to have a step which does
dotnet test foo
dotnet test bar

and another which does
dotnet pack foo
dotnet pack bar

Cannot restore packages from teamcity nuget server

I am using teamcity as my nuget feed. I published 1 dotnet core package using TeamCity CI. I can see that nuget package has been dropped into the nuget feed folder in Teamcity. But cannot restore that package using visual studio or command line.

I used dotnet pack command.

image

Publish prepublish

I'm using dotnet core 1.0 and I'm getting "No executable found matching command "npm"" when running the publish step. It appears it's related to the prepublish scripts in the project.json. Is there something I should be doing that I am not or could this be a bug?

Thanks,
Kevin

Add donet nuget [command] support

There is a new command dotnet nuget [command] since dotnet cli 1.0.0-preview 3.
It can push package to an external Nuget server conveniently

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.