Daniel  Hursan
Daniel Hursan

Reputation: 858

Dynamics CRM 2011 Developer - error on build

In Visual Studio 2010, I created a dynamics package project (Y), and a dynamics plugin project (X), following the tutorial here: http://inogic.blogspot.com/2011/11/crm-2011-developer-toolkit.html#comment-form

The Package Project (Y) references the plugin project (X).

After adding these 2 projects to the solution, I get this error on build:

The item "...\X.csproj" in item list "ProjectReference" does not define a value for metadata "SilverlightApplication". In order to use this metadata, either qualify it by specifying %(ProjectReference.SilverlightApplication), or ensure that all items in this list define a value for this metadata.

I have no idea how to fix this. Can anybody help ?

Upvotes: 2

Views: 1034

Answers (2)

Daniel  Hursan
Daniel Hursan

Reputation: 858

I figured out what the problem was.

Dynamics CRM 2011 Developer Toolkit does not accept virtual folders in the Visual Studio 2010 solution. Each project that is part of the CRM Package must be at top level, directly under the solution.

Otherwise, the error mentioned will pop up.

Upvotes: 3

Svendberg
Svendberg

Reputation: 398

I looks like you have used the "Visual Studio Solution Template for Dynamics CRM 2011". This includes a Silverlight application. Generally i would recommend to only use the "Dynamics CRM 2011 Package" project in combination with the different projects you need for your solution.

Anyway - if you right click your CrmPackage project in Solution Explorer you can select "Edit project file". In this file you should find something like this:

   <ProjectReference Include="..\SilverlightApplication\SilverlightApplication.csproj">
      <Name>SilverlightApplication</Name>
      <Project>{0da346e9-f8fc-4f24-92b5-73832c037b3d}</Project>
      <Private>False</Private>
      <SilverlightApplication>True</SilverlightApplication>
      <SilverlightVersion>v4.0</SilverlightVersion>
    </ProjectReference>

You could try to remove this section, but remember to do a backup first. After you have edited this file you have to right click your project again and select reload project.

Upvotes: 3

Related Questions