SetReportDataSet - Item has already been added

Jan 28, 2013 at 3:18 PM
Edited Jan 28, 2013 at 3:19 PM

Hi,

Do you have any idea why when I try to deploy a report a single report I receive this error:

E:\[..]\Reports\SSRSMSBuildTaskDemoR2_Native.msbuild(213,3): Reporting error SetReportDataSource: Item has already been added. Key in dictionary: 'generalparameters'  Key being added: 'generalparameters'

 

The relevant sections of the build file are below:

 

<!--Reports-->
	<ItemGroup>
    <ReportsToDeploy Include="$(MSBuildProjectDirectory)\admin\HelpdeskDetail.rdl" />
    
    <DataSetToDeploy Include="$(MSBuildProjectDirectory)\admin\GeneralParameters.rsd">
      <Folder>$(ProjectDataSetFolder)</Folder>
      <DataSource>$(ProjectReportDataSources)/ReportServer</DataSource>
      <ReportDataSetNames>GeneralParameters</ReportDataSetNames>
    </DataSetToDeploy>
    <DataSetToDeploy Include="$(MSBuildProjectDirectory)\admin\GeneralTranslations.rsd">
      <Folder>$(ProjectDataSetFolder)</Folder>
      <DataSource>$(ProjectReportDataSources)/ReportServer</DataSource>
      <ReportDataSetNames>GeneralTranslations</ReportDataSetNames>
    </DataSetToDeploy>    
    <DataSetToDeploy Include="$(MSBuildProjectDirectory)\admin\Style.rsd">
      <Folder>$(ProjectDataSetFolder)</Folder>
      <DataSource>$(ProjectReportDataSources)/ReportServer</DataSource>
      <ReportDataSetNames>Style</ReportDataSetNames>
    </DataSetToDeploy>
    <DataSetToDeploy Include="$(MSBuildProjectDirectory)\admin\User.rsd">
      <Folder>$(ProjectDataSetFolder)</Folder>
      <DataSource>$(ProjectReportDataSources)/ReportServer</DataSource>
      <ReportDataSetNames>User</ReportDataSetNames>
    </DataSetToDeploy>
  </ItemGroup>

	<!--DataSoucre-->
	<ItemGroup>
		<!--The Include is the Name of the DataSet to create-->
		<ReportDataSourceToDeploy Include="ReportServer">
			<ConnectionString>Data Source=$(SQLServer);initial catalog=$(ReportServerdb);Integrated Security=True</ConnectionString>
			<Folder>$(ProjectReportDataSources)</Folder>
			<Provider>SQL</Provider>
			<OverWrite>True</OverWrite>
		</ReportDataSourceToDeploy>
		<ReportDataSourceToDeploy Include="ReportParameters">
			<ConnectionString>Data Source=$(SQLServer);initial catalog=server;Integrated Security=True</ConnectionString>
			<Folder>$(ProjectReportDataSources)</Folder>
			<Provider>SQL</Provider>
			<OverWrite>True</OverWrite>
		</ReportDataSourceToDeploy>
	</ItemGroup>
 
 
Coordinator
Feb 20, 2013 at 3:08 PM
Edited Feb 21, 2013 at 11:56 AM
Hi daniels19
 The problem is cause because the dataset is already call generalparameters.   And doesn't need to be in the  ReportDataSetNames.  The ReportDataSetNames is there for when reports have a different name than that of the file name. 
Regards
Steve