简体   繁体   English

我的gacutil(vs2010 4.0)似乎不起作用

[英]My gacutil (vs2010 4.0) does not seem to be working

I recently started making my first GAC Assembly for 4.0 from scratch and when I went to install it I got this: Microsoft (R) .NET Global Assembly Cache Utility. 我最近从头开始制作我的第一个4.0版GAC程序集,当我去安装它时,我得到了这个:Microsoft(R).NET全局程序集缓存实用程序。 Version 3.5.30729.1 Copyright (c) Microsoft Corporation. 版本3.5.30729.1版权所有(c)Microsoft Corporation。 All rights reserved. 版权所有。

Failure adding assembly to the cache: This assembly is built by a runtime newe r than the currently loaded runtime and cannot be loaded. 将程序集添加到缓存失败:此程序集由运行时newe而不是当前加载的运行时构建,无法加载。

So I found the location of the 4.0 GacUtil (C:\\Program Files\\Microsoft SDKs\\Windows\\v7.0A\\bin\\NETFX 4.0 Tools) and overwrote the exe and its config to the versions from there. 所以我找到了4.0 GacUtil(C:\\ Program Files \\ Microsoft SDKs \\ Windows \\ v7.0A \\ bin \\ NETFX 4.0 Tools)的位置,并将exe及其配置覆盖到那里的版本。 I went and ran the the /i on my new Assembly once more and just got: Microsoft (R) .NET Global Assembly Cache Utility. 我再一次在新的程序集上运行了/ i,然后得到了:Microsoft(R).NET全局程序集缓存实用程序。 Version 4.0.30319.1 Copyright (c) Microsoft Corporation. 版本4.0.30319.1版权所有(c)Microsoft Corporation。 All rights reserved. 版权所有。

But there was no trace of the Assembly in c:\\windows\\Assembly. 但是在c:\\ windows \\ Assembly中没有大会的痕迹。 I assumed I was doing something wrong and tried to run a gacutil /? 我以为我做错了什么并试图跑一个gacutil /? to see other options I could try (and to see why no output was being displayed when I was installing the Assembly) but it just kept outputting the same thing: Microsoft (R) .NET Global Assembly Cache Utility. 看看我可以尝试的其他选项(以及为什么在安装程序集时没有显示输出)但它只是输出相同的东西:Microsoft(R).NET全局程序集缓存实用程序。 Version 4.0.30319.1 Copyright (c) Microsoft Corporation. 版本4.0.30319.1版权所有(c)Microsoft Corporation。 All rights reserved. 版权所有。

To make sure I wasn't losing my mind, I copied back the old gacutil.exe I had been using and did the /? 为了确保我没有失去理智,我复制了我一直使用的旧gacutil.exe并做了/? and it loaded the help info for the command. 它加载了命令的帮助信息。 Put the new gacutil back and tried again and still no output. 把新的gacutil放回去再次尝试但仍然没有输出。

Is there something I'm doing wrong or missed when going to use this new 4.0 gacutil? 在使用这个新的4.0 gacutil时,有什么我做错了或错过了吗?

Note: the assembly doesn't show up in Windows\\Microsoft.NET\\Assemblies either. 注意:程序集也不会出现在Windows \\ Microsoft.NET \\ Assemblies中。

If you are copying gacutil.exe out of its original location then there is a 1033/gacutlrc.dll file that needs to be copied with it. 如果要从其原始位置复制gacutil.exe,则需要使用它复制1033 / gacutlrc.dll文件。 Once I copied that file into the new location gacutil seemed to work fine. 一旦我将该文件复制到新位置,gacutil似乎工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM