c#/Mono 解决方案不在远程 Dokku 服务器上构建
c#/Mono solution not building on remote Dokku server
我不熟悉 mono 和在 Dokku 上部署 c# 应用程序。
将我的应用程序推送到远程 dokku 服务器后,构建开始了,我奇迹般地只遇到了 3 个构建错误。
IUserRepository.cs(7,40): error CS0246: The type or namespace name `IRepositoryV2' could not be found. Are you missing an assembly reference?
IAuthenticationUnitOfWork.cs(6,69): error CS0246: The type or namespace name `IUnitOfWork' could not be found. Are you missing an assembly reference?
IAuthenticationUnitOfWork.cs(11,3): error CS0246: The type or namespace name `IRepositoryV2' could not be found. Are you missing an assembly reference?
这些都是我项目中一个解决方案对另一个解决方案的引用。整个解决方案包含大约15个项目。
进一步查看构建输出时,我还看到一些 NuGet 包没有被 found/getting 解析:
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'FluentValidation' not resolved
/tmp/build/Reflect.v2.sln (default targets) ->
(Build target) ->
/tmp/build/Reflect.Data.EF/Reflect.Data.EF.csproj (default targets) ->
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets (ResolveAssemblyReferences target) ->
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'EntityFramework' not resolved
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'Npgsql' not resolved
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'Npgsql.EntityFramework' not resolved
我怀疑这些警告可能是实际问题的指标。但是,我仔细检查了我项目中的所有 NuGet 引用,一切看起来都很好。随后的 packages.config 个文件看起来也不错。
另外,在我的本地机器上一切正常。我正在使用这个构建包:https://github.com/adamburgess/heroku-buildpack-mono
罪魁祸首是什么?谢谢!
这是我的完整构建输出:https://gist.github.com/Corstiaan84/d4798dd1e84486dee2945845293de0f3
我最终从解决方案中删除了有问题的项目,创建了一个新项目并将已删除项目中的文件重新添加到新项目中。不知道究竟是什么解决了这个问题,但现在可以了。
我不熟悉 mono 和在 Dokku 上部署 c# 应用程序。
将我的应用程序推送到远程 dokku 服务器后,构建开始了,我奇迹般地只遇到了 3 个构建错误。
IUserRepository.cs(7,40): error CS0246: The type or namespace name `IRepositoryV2' could not be found. Are you missing an assembly reference?
IAuthenticationUnitOfWork.cs(6,69): error CS0246: The type or namespace name `IUnitOfWork' could not be found. Are you missing an assembly reference?
IAuthenticationUnitOfWork.cs(11,3): error CS0246: The type or namespace name `IRepositoryV2' could not be found. Are you missing an assembly reference?
这些都是我项目中一个解决方案对另一个解决方案的引用。整个解决方案包含大约15个项目。
进一步查看构建输出时,我还看到一些 NuGet 包没有被 found/getting 解析:
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'FluentValidation' not resolved
/tmp/build/Reflect.v2.sln (default targets) ->
(Build target) ->
/tmp/build/Reflect.Data.EF/Reflect.Data.EF.csproj (default targets) ->
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets (ResolveAssemblyReferences target) ->
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'EntityFramework' not resolved
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'Npgsql' not resolved
/tmp/build/mono/lib/mono/4.5/Microsoft.Common.targets: warning : Reference 'Npgsql.EntityFramework' not resolved
我怀疑这些警告可能是实际问题的指标。但是,我仔细检查了我项目中的所有 NuGet 引用,一切看起来都很好。随后的 packages.config 个文件看起来也不错。
另外,在我的本地机器上一切正常。我正在使用这个构建包:https://github.com/adamburgess/heroku-buildpack-mono
罪魁祸首是什么?谢谢!
这是我的完整构建输出:https://gist.github.com/Corstiaan84/d4798dd1e84486dee2945845293de0f3
我最终从解决方案中删除了有问题的项目,创建了一个新项目并将已删除项目中的文件重新添加到新项目中。不知道究竟是什么解决了这个问题,但现在可以了。