Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8512573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T04:18:56+00:00 2026-06-11T04:18:56+00:00

I have setup Maven and Sonar to analyze .NET projects and it works fine

  • 0

I have setup Maven and Sonar to analyze .NET projects and it works fine for winforms projects. However when I add an MVC project it gives a build Failure because it can’t find the System.Web.MVC.dll file. I have an Fx-Cop plugin that runs as part of Sonar.
One way to get around this would be to package the dll, copy local= true with the project. However I dont want to do that(any thing wrong with packaging the MVC file along?)

How do I add a dependency to the MVC dll? I followed this example and added it like this:

<dependencies>
  <dependency>
    <groupId>artifact_group_id</groupId>
    <artifactId>System.WEb.MVC</artifactId>
    <version>4.0.30319</version>
    <type>library</type>
    <scope>system</scope>
    <systemPath>C:\DOTNET\DLLS\System.Web.Mvc.dll</systemPath>
  </dependency>   
</dependencies> 

Still I get a Build Failure caused by FX-Cop. Looking at the FX-Cop logs I get a message as below:

The following error was encountered while reading module ‘MyTestMvcApp’: Assembly reference cannot be resolved: System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35.

I’m using apache-maven-3.0.2 and sonar-3.2. Can anyone help with this?

This is the full POM.XML file

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">


  <modelVersion>4.0.0</modelVersion>
  <groupId>Test</groupId>
  <artifactId>Sonar.For.NET.Test</artifactId>
  <version>1.0</version>
  <name>Testing </name>
  <packaging>netpack</packaging>

  <properties>
    <visual.studio.solution>TestProjectsForSonarBuild.sln</visual.studio.solution>
    <visual.test.project.pattern>*.Tests;*Test</visual.test.project.pattern>
    <dotnet.tool.version>4.0</dotnet.tool.version>
    <sonar.language>cs</sonar.language>
  </properties>

  <dependencies>
    <dependency>
     <groupId>artifact_group_id</groupId>
     <artifactId>System.WEb.MVC</artifactId>
     <version>4.0.30319</version>
     <type>library</type>
     <scope>system</scope>
     <systemPath>C:\DOTNET\DLLS\System.Web.Mvc.dll</systemPath>
    </dependency>
  </dependencies> 


  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.sonar-plugins.dotnet</groupId>
        <artifactId>maven-dotnet-plugin</artifactId>
        <version>0.6</version>
        <extensions>true</extensions>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>sonar-maven-plugin</artifactId>
        <configuration>
                <toolVersion>3.5</toolVersion>
                <buildConfigurations>Debug</buildConfigurations>
                <rebuild>true</rebuild>
            <language>cs</language>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>

Thanks for your time.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T04:18:57+00:00Added an answer on June 11, 2026 at 4:18 am

    You can use the “sonar.fxcop.assemblyDependencyDirectories” property as described on the documentation page for the FxCop plugin.

    So you have 2 solutions from there:

    • either your build process copies “System.Web.MVC.dll” in a temp folder, which you reference through the this property

    • or you directly reference an absolute path where this DLL can be found (but your property may then be not portable accros different environments/servers)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have my maven project setup as 1 shell projects and 4 children modules.
I have a project setup using Spring 3, Apache Tiles 2 and Maven. Before
i have a Maven 2 project setup which nicely packages a war file using
I have setup Maven project locally without eclipse, it is completed succefully. Now i
I have a multimodule maven setup for my project, made of 5 modules, which
I have the following maven-setup: parent-project |- libraries |- utilities |- core |- component1
We have a complicated setup via Maven, where different projects are packaged as wars
I have a Maven project that has always worked fine in Netbeans, but upgrading
I've just setup my first Spring MVC 3 project with Hibernate 3 using Maven.
i have to setup an android maven build for a customer, which previously was

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.