[英]How can I skip building all referenced projects every time when I build my source project
I have Xamarin.Forms
project which has many dependencies of other projects.我有
Xamarin.Forms
项目,它与其他项目有很多依赖关系。 When I am doing any modification in business logic every time I need to execute/build my project.当我每次需要执行/构建我的项目时对业务逻辑进行任何修改时。
Due to many other projects dependencies it is taking huge time to complete built(10-15 mins) and showing build o/p.由于许多其他项目的依赖关系,它需要花费大量时间来完成构建(10-15 分钟)并显示构建 o/p。
Done building project "Project1.csproj".
完成构建项目“Project1.csproj”。
Done building project "Project2.csproj".
完成构建项目“Project2.csproj”。
Done building project "Project3.csproj".
完成构建项目“Project3.csproj”。
Done building project "Project4.csproj".
完成构建项目“Project4.csproj”。
Done building project "Project5.csproj".....
完成构建项目“Project5.csproj”.....
If I remove above projects dependencies from source project's .csproj
file如果我从源项目的
.csproj
文件中删除上述项目依赖项
<ItemGroup>
<ProjectReference Include="..\..\..\Components\Business\Project1\Project1.csproj" />
<ProjectReference Include="..\..\..\Components\BusinessUI\Project2\Project2.csproj" />
<ProjectReference Include="..\..\..\Components\Core\Project3\Project3.csproj" />
<ProjectReference Include="..\..\..\Components\CoreUI\Project4\Project4.csproj" />
<ProjectReference Include="..\..\..\Components\Shared\Project4\Project5.csproj" />
</ItemGroup>
I am getting so many compile time errors我收到很多编译时错误
are you missing an assembly reference?
您是否缺少程序集参考?
How can I build my source project without building all dependent projects every time so that I can save my time?如何在不每次都构建所有依赖项目的情况下构建我的源项目,以便节省时间?
How have you referenced those projects?你是如何引用这些项目的? Are the referenced as project files, or their compiled.dll/.exe form?
是作为项目文件引用,还是它们的compiled.dll/.exe 形式?
It sounds like those were added as raw Projects/sourcecode.听起来这些是作为原始项目/源代码添加的。 And in that case, of course they have to be compiled.
在这种情况下,当然必须编译它们。 It would be like trying to only compile half the sourcecode otherwise.
这就像试图只编译一半的源代码一样。
In .NET you can use any .NET.dll or .NET.exe as assembly reference.在 .NET 中,您可以使用任何 .NET.dll 或 .NET.exe 作为程序集参考。 With the .NET internal stuff you always use.dll's.
使用 .NET 内部的东西,您总是使用.dll。 But.exe works too.
但是.exe 也可以。 You would have to deploy those.dll's/.exe's with the code, but something like copying it to the output directory as a build action should work.
您必须使用代码部署那些.dll/.exe,但是像将其复制到 output 目录作为构建操作应该可以工作。 Indeed I never even heard of referencing the raw project, but it might be there somewhere.
事实上,我什至从未听说过引用原始项目,但它可能在某个地方。
Internally the .NET.exe is almost identically to a .NET.dll. .NET.exe 在内部与 .NET.dll 几乎相同。 Some bootstrap code and a entry point more, maybe some fringe stuff like COM interop less.
一些引导代码和更多入口点,也许像 COM 互操作这样的边缘内容更少。 It is one of those parts where they drew heavy inspiration from Java bytecode - and then made it better.
这是他们从 Java 字节码中汲取灵感的部分之一,然后将其做得更好。 So you can just add them as a reference.
因此,您可以将它们添加为参考。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.