C# Project Metrics of One Solution takes me to another Solution

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

C# Project Metrics of One Solution takes me to another Solution

Guru

I have two solution files called S1 and S2

S1 has
|
|-->Proj1
|
|__Proj2

where in
S2 has
|
|-->proj3
|
|-Proj1

there is no link between S1.proj1 and S2.proj1 both are separate one's.

I have configured it sonar and it generates the metrics without any issues.
But, i have navigated to S1-Components list, when i click on proj1 it takes me to S2 proj1 rules violations instated of showing the S1 proj1 rules violations

Any idea, why does behaving like that?
Reply | Threaded
Open this post in threaded view
|

Re: C# Project Metrics of One Solution takes me to another Solution

Fabrice Bellingard-4
Hi Guru,

yes, there's an issue when multiple solutions have projects with the same name. You can solve this issue by setting "sonar.dotnet.key.generation.strategy" to "safe" in the Settings of your Sonar instance (this can be found in the ".NET" menu entry of the Global Settings).

In a future version, this property will be set by default to "safe" in order to prevent such issues.


Best regards,

Fabrice BELLINGARD | SonarSource
http://sonarsource.com


On Fri, Apr 26, 2013 at 2:00 PM, Guru <[hidden email]> wrote:

I have two solution files called S1 and S2

S1 has
|
|-->Proj1
|
|__Proj2

where in
S2 has
|
|-->proj3
|
|-Proj1

there is no link between S1.proj1 and S2.proj1 both are separate one's.

I have configured it sonar and it generates the metrics without any issues.
But, i have navigated to S1-Components list, when i click on proj1 it takes
me to S2 proj1 rules violations instated of showing the S1 proj1 rules
violations

Any idea, why does behaving like that?




--
View this message in context: http://sonar.15.x6.nabble.com/C-Project-Metrics-of-One-Solution-takes-me-to-another-Solution-tp5011883.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: C# Project Metrics of One Solution takes me to another Solution

Guru
Hi Fabrice ,

Thanks for the suggestion.

i have tried with that option still it's not working. does this option work in sonar-2.13.1 and Runner1.1? from which version on-words will it support.
Reply | Threaded
Open this post in threaded view
|

Re: C# Project Metrics of One Solution takes me to another Solution

David Racodon-2
Hi,

As described in the documentation, this property has been introduced with version 1.4 of the C# ecosystem.

Which version are you running?

Thank you

Regards,


David RACODON | SonarSource
Senior Consultant


On 27 April 2013 12:13, Guru <[hidden email]> wrote:
Hi Fabrice ,

Thanks for the suggestion.

i have tried with that option still it's not working. does this option work
in *sonar-2.13.1* and *Runner1.1*? from which version on-words will it
support.



--
View this message in context: http://sonar.15.x6.nabble.com/C-Project-Metrics-of-One-Solution-takes-me-to-another-Solution-tp5011883p5011920.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: C# Project Metrics of One Solution takes me to another Solution

Guru
Hi David,

i have tried with plugin version 1.4 with sonar server 2.13.1. while analyzing the project i am getting the following error.

 [exec] 11:15:59.850 WARN  Derby database should be used for evaluation purpose only
     [exec] 11:15:59.854 INFO  Create JDBC datasource
     [exec] 11:16:00.597 INFO  Initializing Hibernate
     [exec] 11:16:06.899 INFO  The following 'sln' file has been found and will be used: C:\App\Sonar\MPD-Common\Releases\Spring2013\Source\MPD\SpacePlanning\Custom\Rollout\Rollout.sln
     [exec] 11:16:06.899 INFO  The old .NET parameter 'sonar.donet.visualstudio.testProjectPattern' has been found and will be used. Its value: '*.UnitTest*'
     [exec] 11:16:08.412 INFO  The project 'Rollout.UnitTest' has been qualified as a test project.
     [exec] 11:16:09.175 INFO  -------------  Analyzing Rollout.Contracts
     [exec] Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: java.lang.NoClassDefFoundError: Lorg/sonar/api/measures/FileLinesContextFactory;
     [exec] at org.sonar.runner.Runner.delegateExecution(Runner.java:155)
     [exec] at org.sonar.runner.Runner.execute(Runner.java:58)
     [exec] at org.sonar.runner.Main.main(Main.java:52)
     [exec] Caused by: java.lang.NoClassDefFoundError: Lorg/sonar/api/measures/FileLinesContextFactory;
     [exec] at java.lang.Class.getDeclaredFields0(Native Method)
     [exec] at java.lang.Class.privateGetDeclaredFields(Unknown Source)
     [exec] at java.lang.Class.getDeclaredFields(Unknown Source)
     [exec] at org.picocontainer.injectors.AdaptingInjection$2.run(AdaptingInjection.java:217)
     [exec] at java.security.AccessController.doPrivileged(Native Method)
     [exec] at org.picocontainer.injectors.AdaptingInjection.injectionFieldAnnotated(AdaptingInjection.java:209)
     [exec] at org.picocontainer.injectors.AdaptingInjection.fieldAnnotatedInjectionAdapter(AdaptingInjection.java:188)
     [exec] at org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(AdaptingInjection.java:57)
     [exec] at org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAdapter(AbstractBehaviorFactory.java:44)
     [exec] at org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptInCaching.java:45)
     [exec] at org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:535)
     [exec] at org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:80)
     [exec] at org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1130)
     [exec] at org.sonar.api.platform.ComponentContainer.addComponent(ComponentContainer.java:92)
     [exec] at org.sonar.api.platform.ComponentContainer.addSingleton(ComponentContainer.java:84)
     [exec] at org.sonar.batch.bootstrap.Module.addCoreSingleton(Module.java:115)
     [exec] at org.sonar.batch.bootstrap.ProjectExtensionInstaller.installExtension(ProjectExtensionInstaller.java:86)
     [exec] at org.sonar.batch.bootstrap.ProjectExtensionInstaller.install(ProjectExtensionInstaller.java:59)
     [exec] at org.sonar.batch.bootstrap.ProjectModule.addProjectPluginExtensions(ProjectModule.java:113)
     [exec] at org.sonar.batch.bootstrap.ProjectModule.configure(ProjectModule.java:62)
     [exec] at org.sonar.batch.bootstrap.Module.init(Module.java:49)
     [exec] at org.sonar.batch.bootstrap.Module.installChild(Module.java:70)
     [exec] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:109)
     [exec] at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106)
     [exec] at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101)
     [exec] at org.sonar.batch.bootstrap.Module.start(Module.java:83)
     [exec] at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102)
     [exec] at org.sonar.batch.bootstrap.Module.start(Module.java:83)
     [exec] at org.sonar.batch.Batch.execute(Batch.java:100)
     [exec] at org.sonar.runner.Launcher.executeBatch(Launcher.java:60)
     [exec] at org.sonar.runner.Launcher.execute(Launcher.java:53)
     [exec] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [exec] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     [exec] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     [exec] at java.lang.reflect.Method.invoke(Unknown Source)
     [exec] at org.sonar.runner.Runner.delegateExecution(Runner.java:152)
     [exec] ... 2 more
     [exec] Caused by: java.lang.ClassNotFoundException: org.sonar.api.measures.FileLinesContextFactory
     [exec] at org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
     [exec] at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
     [exec] at org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
     [exec] ... 38 more

does sonar server 2.13.1 version supports C# plugin 1.4?
Reply | Threaded
Open this post in threaded view
|

Re: C# Project Metrics of One Solution takes me to another Solution

David Racodon-2
Hi,

It requires version 3.0 of Sonar.

Regards,


David RACODON | SonarSource
Senior Consultant


On 29 April 2013 08:09, Guru <[hidden email]> wrote:
Hi David,

i have tried with plugin version 1.4 with sonar server 2.13.1. while
analyzing the project i am getting the following error.

 [exec] 11:15:59.850 WARN  Derby database should be used for evaluation
purpose only
     [exec] 11:15:59.854 INFO  Create JDBC datasource
     [exec] 11:16:00.597 INFO  Initializing Hibernate
     [exec] 11:16:06.899 INFO  The following 'sln' file has been found and
will be used:
C:\App\Sonar\MPD-Common\Releases\Spring2013\Source\MPD\SpacePlanning\Custom\Rollout\Rollout.sln
     [exec] 11:16:06.899 INFO  The old .NET parameter
'sonar.donet.visualstudio.testProjectPattern' has been found and will be
used. Its value: '*.UnitTest*'
     [exec] 11:16:08.412 INFO  The project 'Rollout.UnitTest' has been
qualified as a test project.
     [exec] 11:16:09.175 INFO  -------------  Analyzing Rollout.Contracts
     [exec] Exception in thread "main"
org.sonar.batch.bootstrapper.BootstrapException:
java.lang.NoClassDefFoundError:
Lorg/sonar/api/measures/FileLinesContextFactory;
     [exec]     at org.sonar.runner.Runner.delegateExecution(Runner.java:155)
     [exec]     at org.sonar.runner.Runner.execute(Runner.java:58)
     [exec]     at org.sonar.runner.Main.main(Main.java:52)
     [exec] Caused by: java.lang.NoClassDefFoundError:
Lorg/sonar/api/measures/FileLinesContextFactory;
     [exec]     at java.lang.Class.getDeclaredFields0(Native Method)
     [exec]     at java.lang.Class.privateGetDeclaredFields(Unknown Source)
     [exec]     at java.lang.Class.getDeclaredFields(Unknown Source)
     [exec]     at
org.picocontainer.injectors.AdaptingInjection$2.run(AdaptingInjection.java:217)
     [exec]     at java.security.AccessController.doPrivileged(Native Method)
     [exec]     at
org.picocontainer.injectors.AdaptingInjection.injectionFieldAnnotated(AdaptingInjection.java:209)
     [exec]     at
org.picocontainer.injectors.AdaptingInjection.fieldAnnotatedInjectionAdapter(AdaptingInjection.java:188)
     [exec]     at
org.picocontainer.injectors.AdaptingInjection.createComponentAdapter(AdaptingInjection.java:57)
     [exec]     at
org.picocontainer.behaviors.AbstractBehaviorFactory.createComponentAdapter(AbstractBehaviorFactory.java:44)
     [exec]     at
org.picocontainer.behaviors.OptInCaching.createComponentAdapter(OptInCaching.java:45)
     [exec]     at
org.picocontainer.DefaultPicoContainer.addComponent(DefaultPicoContainer.java:535)
     [exec]     at
org.picocontainer.DefaultPicoContainer.access$300(DefaultPicoContainer.java:80)
     [exec]     at
org.picocontainer.DefaultPicoContainer$AsPropertiesPicoContainer.addComponent(DefaultPicoContainer.java:1130)
     [exec]     at
org.sonar.api.platform.ComponentContainer.addComponent(ComponentContainer.java:92)
     [exec]     at
org.sonar.api.platform.ComponentContainer.addSingleton(ComponentContainer.java:84)
     [exec]     at
org.sonar.batch.bootstrap.Module.addCoreSingleton(Module.java:115)
     [exec]     at
org.sonar.batch.bootstrap.ProjectExtensionInstaller.installExtension(ProjectExtensionInstaller.java:86)
     [exec]     at
org.sonar.batch.bootstrap.ProjectExtensionInstaller.install(ProjectExtensionInstaller.java:59)
     [exec]     at
org.sonar.batch.bootstrap.ProjectModule.addProjectPluginExtensions(ProjectModule.java:113)
     [exec]     at
org.sonar.batch.bootstrap.ProjectModule.configure(ProjectModule.java:62)
     [exec]     at org.sonar.batch.bootstrap.Module.init(Module.java:49)
     [exec]     at
org.sonar.batch.bootstrap.Module.installChild(Module.java:70)
     [exec]     at
org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:109)
     [exec]     at
org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:106)
     [exec]     at
org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101)
     [exec]     at org.sonar.batch.bootstrap.Module.start(Module.java:83)
     [exec]     at
org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:102)
     [exec]     at org.sonar.batch.bootstrap.Module.start(Module.java:83)
     [exec]     at org.sonar.batch.Batch.execute(Batch.java:100)
     [exec]     at org.sonar.runner.Launcher.executeBatch(Launcher.java:60)
     [exec]     at org.sonar.runner.Launcher.execute(Launcher.java:53)
     [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [exec]     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     [exec]     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown
Source)
     [exec]     at java.lang.reflect.Method.invoke(Unknown Source)
     [exec]     at org.sonar.runner.Runner.delegateExecution(Runner.java:152)
     [exec]     ... 2 more
     [exec] Caused by: java.lang.ClassNotFoundException:
org.sonar.api.measures.FileLinesContextFactory
     [exec]     at
org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy.loadClass(SelfFirstStrategy.java:50)
     [exec]     at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:244)
     [exec]     at
org.codehaus.plexus.classworlds.realm.ClassRealm.loadClass(ClassRealm.java:230)
     [exec]     ... 38 more

does sonar server 2.13.1 version supports C# plugin 1.4?



--
View this message in context: http://sonar.15.x6.nabble.com/C-Project-Metrics-of-One-Solution-takes-me-to-another-Solution-tp5011883p5011936.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: C# Project Metrics of One Solution takes me to another Solution

Ashley Lewis
This post has NOT been accepted by the mailing list yet.
In reply to this post by Fabrice Bellingard-4
I tried setting sonar.dotnet.key.generation.strategy to safe but now I can't use sonar.skippedModules! I fix one problem and another pops up like whack-a-mole!