构建项目时发生错误 - 错误:CS0006“... \ Assembly-CSharp-firstpass.dll”找不到

简介: 构建项目时发生错误 - 错误:CS0006“... \ Assembly-CSharp-firstpass.dll”找不到 我正在为Hololens建立一个简单的项目。 独特的场景与简单的立方体。 我遵循这个教程做出来: - > https://developer.

构建项目时发生错误 - 错误:CS0006“... \ Assembly-CSharp-firstpass.dll”找不到

我正在为Hololens建立一个简单的项目。

独特的场景与简单的立方体。

我遵循这个教程做出来:

- > https://developer.microsoft.com/en-us/windows/mixed-reality/holograms_100 
- > https://developer.microsoft.com/en-us/windows/mixed-reality/using_visual_studio#hololens 
- > http://pterneas.com/2016/04/04/getting-started-hololens-unity3d/

但是,当我构建时会显示这个错误: 在这里输入图像描述

我正在使用最新版本的Unity和Visual Studio:

Unity:v2017.1.0f3 
Visual Studio:v15.3.2

有趣的是,我有一个v15.2版本(26430.16) Visual Studio 的朋友,他通常会构建任何Hololens应用程序。

我已经重新安装了我的Visual Studio和Unity(最新版本),但错误仍在继续。

我发现这个教程 - > http://www.imaginativeuniversal.com/blog/2017/06/24/hololens-fix-visual-studio-2017-build-error/但不起作用。

我的输出:

Restoring NuGet packages ...
To prevent NuGet from restoring packages during compilation, open the Visual Studio Options dialog box, click on the Package Manager node and uncheck 'Allow NuGet to download missing packages during compilation'.
1> ------ Compilation started: Project: Assembly-CSharp-firstpass, Configuration: x86 Release ------
1> Running SerializationWeaver ...
1> System.Collections.Generic.KeyNotFoundException: The supplied key was not present in the dictionary.
1> at System.ThrowHelper.ThrowKeyNotFoundException ()
1> at System.Collections.Generic.Dictionary`2.get_Item (TKey key)
1> in UnityEditor.Scripting.Compilers.NuGetPackageResolver.Resolve ()
1> in Unity.NuGetAssemblyResolver..ctor (String projectLockFile)
1> in usw.Weaver.ReaderParameters (String assemblyPath, ConversionOptions options)
1> in usw.Weaver.Weave ()
1> in usw.Program.RunProgram (ConversionOptions options)
1> in usw.Program.Main (String [] args)
C: \ Users \ luq.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ GeneratedProjects \ UWP \ Assembly-CSharp-firstpass \ Assembly-CSharp-firstpass.csproj (196,5): error MSB3073: : \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ Unity \ Tools \ SerializationWeaver \ SerializationWeaver.exe "" C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ GeneratedProjects \ UWP \ Assembly- CSharp-firstpass \ bin \ x86 \ Release \ Unprocessed \ Assembly-CSharp-firstpass.dll "-pdb" -verbose "-web-engine = C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ BuildLimpa \ Unprocessed \ UnityEngine.dll "" C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ app \ GeneratedProjects \ UWP \ Assembly-CSharp-FirstPass \ obj \ x86 \ Release \ x86 \ Release "" -lock = C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ app \ GeneratedProjects \ UWP \ Assembly-CSharp-FirstPass \ project.lock.json "" @C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ GeneratedProjects \ UWP \ Assembly-CSharp-firstpass \ SerializationWeaverArgs.txt "-additionalAssemblyP ATH = C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ app \ BuildLimpa \ Unprocessed "" -unity-networking = C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ app \ BuildLimpa \ Unprocessed \ UnityEngine.Networking.dll "was terminated with code 1.
2> ------ Compilation started: Project: Assembly-CSharp, Configuration: Release x86 ------
2> CSC: error CS0006: C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ GeneratedProjects \ UWP \ Assembly-CSharp-firstpass \ bin \ x86 \ Release-Assembly-CSharp-firstpass source file. Dll "can not be found
3> ------ Compilation started: Project: BuildLimpa, Configuration: Release x86 ------
3> CSC: error CS0006: C: \ Users \ luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ GeneratedProjects \ UWP \ Assembly-CSharp-firstpass \ bin \ x86 \ Release-Assembly-CSharp-firstpass source file. Dll "can not be found
CSC: Error CS0006: C: \ Users \ Luiz.santana \ Documents \ _Unity3D \ BuildLimpa \ App \ GeneratedProjects \ UWP \ Assembly-CSharp \ bin \ x86 \ Release \ Assembly-CSharp.dll "source file can not To be found
========== Compile: 0 successfully, 3 failed, 0 refreshed, 0 ignored ==========
========== Deployment: 0 Successfully, 0 Failed, 0 Ignored ==========

必须发生什么?我如何解决它?


解决了

我只是改变了project.lock.json文件中的版本。它与Version=v10.0.10240´. I just ´find/replace所有,并取代Version=v10.0和工作!

我在这个链接中找到了一个解决方案:https : //forum.unity3d.com/threads/net-scripting-backend-and-visual-studio-2017-3-incompatibility.487833/

原文地址https://stackoverflow.com/questions/45941755/error-while-building-project-hololens-error-cs0006-assembly-csharp-first

相关文章
|
Java 应用服务中间件 Nacos
阿里巴巴NACOS(3)- 部署Nacos的生产集群环境
上一篇文章介绍了如何在Spring Cloud中使用Nacos,让我感觉是无缝支持Spring Cloud,可惜的是阿里云的MSE暂时只支持Nacos的服务注册和发现,配置中心还是需要用阿里云的ACM来完成,本文将介绍如何部署Nacos的生产集群环境。
14270 0
阿里巴巴NACOS(3)- 部署Nacos的生产集群环境
|
6月前
|
负载均衡 并行计算 异构计算
大模型训练推理优化(5): FlexLink —— NVLink 带宽无损提升27%
本期我们将介绍蚂蚁集团ASystem团队在大模型通信优化上的新工作FlexLink,旨在通过动态聚合多路通信(NVLink,PCIe,RDMA),在H800等典型硬件上将典型通信算子如(AllReduce, All Gather)吞吐提升最高达27%,尤其适合大模型长序列推理(Prefill阶段),及训练等通信密集的带宽bound场景。方案对精度无影响。
|
测试技术 API
如何用Apifox 发送接口请求?
今天我们就来学习下大部分都要用的API工具的接口测试功能,也是对测试人员来说最实用的功能。
如何用Apifox 发送接口请求?
|
人工智能 并行计算 PyTorch
AI计算机视觉笔记十八:Swin Transformer目标检测环境搭建
本文详细记录了Swin Transformer在AutoDL平台上的环境搭建与训练过程。作者从租用GPU实例开始,逐步介绍了虚拟环境的创建、PyTorch安装、mmcv及mmdetection的配置,并解决了安装过程中遇到的各种问题,如cython版本冲突等。最后,通过修改代码实现目标检测结果的保存。如需了解更多细节或获取完整代码,请联系作者。原文链接:[原文链接](请在此处插入原文链接)。
1318 5
|
存储 Linux Shell
使用Git LFS托管大文件
使用Git LFS托管大文件
|
API
Tushare
【6月更文挑战第9天】
1813 4
|
算法 编译器 C++
C++基础知识(三:哑元和内联函数和函数重载)
在C++编程中,"哑元"这个术语虽然不常用,但可以理解为在函数定义或调用中使用的没有实际功能、仅作为占位符的参数。这种做法多见于模板编程或者为了匹配函数签名等场景。例如,在实现某些通用算法时,可能需要一个特定数量的参数来满足编译器要求,即使在特定情况下某些参数并不参与计算,这些参数就可以被视为哑元。
506 1
|
存储 安全 Windows
Windows无法完成格式化怎么办?5种解决方法
在使用电脑时,我们有时会遇到“Windows无法完成格式化”的问题,这可能由磁盘写保护、权限限制、物理损坏或磁盘占用等原因引起。为解决这个问题,可以尝试关闭写保护开关、提升格式化权限、使用第三方工具、在CMD中用diskpart命令格式化或检查磁盘健康状况。如果磁盘有重要数据,可以先用数据恢复软件拯救数据。如果以上方法无效,可能需要专业售后检查修复或更换硬件。记得在操作前备份重要文件,以防数据丢失。
|
前端开发 JavaScript API
flowable流程移植新项目前端问题汇总
flowable流程移植新项目前端问题汇总
210 0
|
数据安全/隐私保护 Windows
Windows Server 2003 搭建邮件服务器实现自建邮箱域名及账户并连接外网
Windows Server 2003 搭建邮件服务器实现自建邮箱域名及账户并连接外网