Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

GAC_MSIL version reference conflict error on MSBuild compilation Edited

Hi All,

I am getting below error when compiling ASP.NET website project using MSBuild v16.0 (32bit) on public agent.

Note: It works fine on local machine using VS2019 and also working fine on public agents with MSbuild 14.0

Here is the error:

The type 'System.Web.Helpers.AntiForgery' exists in both 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_2.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll' and 'c:\Windows\Microsoft.NET\assembly\GAC_MSIL\System.Web.WebPages\v4.0_1.0.0.0__31bf3856ad364e35\System.Web.WebPages.dll'

Here is the web.config file:

<compilation debug="true" targetFramework="4.8" batch="false">
<assemblies>
<add assembly="stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
<add assembly="Office, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C"/>
<add assembly="System.Web.Helpers, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
</assemblies>
</compilation>

Solutions i tried:

1. Added batch=false in the compilation element.

2. Tried deleting one of the System.Web.WebPages.dll from the system. But the dll is autogenerated back on the system and set batch=true in the compilation element.

3. Have requested to delete the ASP.NET temp folder and IIS reset. (In-progress)

 

Kindly help me out to solve the above issue.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.2 is here!

I'm happy to announce that Bamboo 7.2 has been released and it’s overflowing with awesome new features. This will be the last major Server release before the launch of Bamboo DC. Bamboo logs We...

474 views 5 7
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you