How to use mdtool to build project in commandline which has a ProjectReference?

andliuandliu CNMember
edited October 2015 in Visual Studio

Hello everyone.

There are 2 projects in a solution. Project A is reference by project B.
When I use mdtool to build project A, everything is fine.
But when I use mdtool to build project B, I get several errors:
Couldn't find type or namespace "Template"
Couldn't find type or namespace "Config"
...
Template and Config is defined in project A.
As long as a type or namespace defined in project A appears in project B, there is an error.

Here is part of B.csproj:
<ItemGroup> <ProjectReference Include="A.csproj"> <Project>{c779f75e-76c0-07a9-f994-ecad6750536e}</Project> <Name>A</Name> </ProjectReference> </ItemGroup>

And commandline:
mdtool.exe build /t:Build /c:Debug ./B.csproj

How can I build project B successfully with mdtool?

Any advice is appreciated.

btw, build project A and B with ide is successful.

Answers

  • andliuandliu CNMember

    Problem solved, use mdtool to build entire solution stead of single project.

Sign In or Register to comment.