-
-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support multiple edmx files in the same project. #5
Comments
@malylemire1 I've been looking at adding some features to this package to cover scenarios like this one. Generally, I keep multiple You could manually call the custom MSBuild task multiple times from a custom target in your project, and pass in each view. Untested: <PropertyGroup>
<CompileDependsOn>CustomEF6Views;$(CompileDependsOn)</CompileDependsOn>
</PropertyGroup>
<Target Name="CustomEF6Views">
<MakeDir Directories="$(EntityFramework6GenerateViewsOutputDir)" ContinueOnError="true" />
<ItemGroup>
<_EntityViewCompile Remove="@(_EntityViewCompile)" />
<_Temporary Remove="@(_Temporary)" />
<_Temporary Include="EDMX\First.edmx">
<CustomToolNamespace>MMBS.EntityFramework.First</CustomToolNamespace>
</_Temporary>
</ItemGroup>
<C3D.MSBuild.Tools.EF6.Tasks.GenerateViews
SourceFiles="@(_Temporary)"
OutputDirectory="$(EntityFramework6GenerateViewsOutputDir)"
AssemblyName="$(AssemblyName)"
Language="$(Language)"
DefaultNamespace="$(RootNamespace)"
Debug="$(EntityFramework6GenerateViewsDebug)">
<Output TaskParameter="OutputFile" ItemName="_EntityViewCompile" />
</C3D.MSBuild.Tools.EF6.Tasks.GenerateViews>
<ItemGroup>
<_Temporary Remove="@(_Temporary)" />
<_Temporary Include="EDMX\Second.edmx">
<CustomToolNamespace>MMBS.EntityFramework.Second</CustomToolNamespace>
</_Temporary>
</ItemGroup>
<C3D.MSBuild.Tools.EF6.Tasks.GenerateViews
SourceFiles="@(_Temporary)"
OutputDirectory="$(EntityFramework6GenerateViewsOutputDir)"
AssemblyName="$(AssemblyName)"
Language="$(Language)"
DefaultNamespace="$(RootNamespace)"
Debug="$(EntityFramework6GenerateViewsDebug)">
<Output TaskParameter="OutputFile" ItemName="_EntityViewCompile" />
</C3D.MSBuild.Tools.EF6.Tasks.GenerateViews>
<ItemGroup>
<Compile Include="@(_EntityViewCompile)" Condition="EXISTS('%(FullPath)')" />
<FileWrites Include="@(_EntityViewCompile)" Condition="EXISTS('%(FullPath)')" />
</ItemGroup>
</Target> |
Hi, I have managed to make it work with a simple change
|
Support multiple edmx files in the same project.
The text was updated successfully, but these errors were encountered: