我有一个看起来像这样的设置
ServiceA \ SRC \ aspnetproject
ServiceB \ SRC \ aspnetproject
SharedComponents \ SRC \ sharedcomponent
每个服务都有自己的解决方案文件,其中还包含一些共享组件。共享组件是经典的.Net程序集。 wrap project.json文件位于SharedComponents \ src \ wrap \ sharedcomponent中。我可以毫无问题地从aspnetproject添加对sharedcomponent的引用,但是使用它无法构建。当项目都在同一个文件夹中时,这可以正常工作。有什么想法吗?
构建错误:
1>------ Rebuild All started: Project: BeoCloud.Core.Models, Configuration: Debug Any CPU ------
2>------ Rebuild All started: Project: FacadeApiService, Configuration: Debug x64 ------
1> BeoCloud.Core.Models -> C:\Projects\BeoCloud\Core\src\BeoCloud.Core.Models\bin\Debug\BeoCloud.Core.Models.dll
3>------ Rebuild All started: Project: Api, Configuration: Debug Any CPU ------
3>C:\Projects\BeoCloud\Facade\src\Api\Controllers\SearchController.cs(14,69,14,88): DNX 4.5.1 error CS0246: The type or namespace name 'SimpleSearchRequest' could not be found (are you missing a using directive or an assembly reference?)
3>C:\Projects\BeoCloud\Facade\src\Api\Controllers\SearchController.cs(14,27,14,47): DNX 4.5.1 error CS0246: The type or namespace name 'SimpleSearchResponse' could not be found (are you missing a using directive or an assembly reference?)
3>C:\Projects\BeoCloud\Facade\src\Api\Controllers\SearchController.cs(28,28,28,48): DNX 4.5.1 error CS0246: The type or namespace name 'SimpleSearchResponse' could not be found (are you missing a using directive or an assembly reference?)
3>C:\Projects\BeoCloud\Facade\src\Api\Controllers\SearchController.cs(36,28,36,48): DNX 4.5.1 error CS0246: The type or namespace name 'SimpleSearchResponse' could not be found (are you missing a using directive or an assembly reference?)
3>C:\Projects\BeoCloud\Facade\src\Api\Controllers\SearchController.cs(14,49,14,68): DNX 4.5.1 warning CS1998: This async method lacks 'await' operators and will run synchronously. Consider using the 'await' operator to await non-blocking API calls, or 'await Task.Run(...)' to do CPU-bound work on a background thread.
3>
3> Build failed.
3> 1 Warning(s).
3> 4 Error(s).
3>
3> Time elapsed 00:00:00.0609992
3>
========== Rebuild All: 2 succeeded, 1 failed, 0 skipped ==========