Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/silverlight/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wpf 未知生成错误“;此实现不是Windows平台FIPS验证加密算法的一部分;_Wpf_Silverlight_Xaml_Fips - Fatal编程技术网

Wpf 未知生成错误“;此实现不是Windows平台FIPS验证加密算法的一部分;

Wpf 未知生成错误“;此实现不是Windows平台FIPS验证加密算法的一部分;,wpf,silverlight,xaml,fips,Wpf,Silverlight,Xaml,Fips,所以我启用了这个组策略,第一次尝试编译我的解决方案时,我得到了这个错误。有趣的是,我只在一个地方使用了加密函数,但我看到的是我所有的Silverlight ResourceDictionary文件和WPF userControl文件。其他一切似乎都很好 为什么我只在不加密的xaml文件上看到错误?我知道我可以禁用FIPS组策略,但我确实想支持它。你知道为什么特定的XAML文件在编译时会抛出这个错误吗?经过一些研究,我发现这个答案很有意义: 以下是链接的内容,以备删除: The followin

所以我启用了这个组策略,第一次尝试编译我的解决方案时,我得到了这个错误。有趣的是,我只在一个地方使用了加密函数,但我看到的是我所有的Silverlight ResourceDictionary文件和WPF userControl文件。其他一切似乎都很好


为什么我只在不加密的xaml文件上看到错误?我知道我可以禁用FIPS组策略,但我确实想支持它。你知道为什么特定的XAML文件在编译时会抛出这个错误吗?

经过一些研究,我发现这个答案很有意义:

以下是链接的内容,以备删除:

The following is the reply I got from the WPF XAML team:

We didn’t fix it because this issue was discovered days (June 2, 2008) before the release.

I still have the BBPack I didn’t checkin.  Here is the comment from the code.



            // The Federal Information Processing Standard mandates that

            // MD5 is obsolete and not safe for cryptographic checksums.

            // We are using it to coordinating source files for debugging

            // not authenticating so MD5 use is OK here.

            // But, on a OS with the FIPS compliant switch ON, the managed

            // MD5CryptoServiceProvider Ctor will throw.  So we can't use it.

            //

            // Currently we use a PInvoke wrapper to the Native layer;

            // which still works, even on a FIPS compliant machine.  A Better

            // fix would be to move to the approved SHA checksums, but that

            // will require co-ordination with VS and the Debugger groups etc.



The MSI builder and a few other tools also threw on a FIPS=1 machine.

So even we if we fixed our part (in 3.5sp1), the customer’s end-to-end solution was still broken.



General FIPS info:

http://support.microsoft.com/kb/811833/en-us

我知道我有点晚了,但我最近遇到了这个问题,也找到了解决办法。出于@mdutra所述的原因,这就是它不起作用的原因,但有趣的是,VisualStudio2010和2012有两个不同的“修复”

Microsoft Connect post(已不存在)声明:

Visual Studio 2012现在在运行msbuild的单独进程中构建C#项目。此进程将看不到您添加到devenv.exe.config(适用于VS 2010)的条目。您应该将
直接添加到msbuild.exe.config文件中的
标记上方;通常在
C:\Windows\Microsoft.Net\Framework\v4.0.30319\msbuild.exe.config
中找到


我还将其添加到
C:\Windows\Microsoft.Net\Framework64\v4.0.30319\msbuild.exe.config
文件中,因为我不知道使用的是哪个msbuild。

找到解决方法了吗?我也有同样的问题。WPF 4.5.1仍然存在这个问题。除了禁用FIP之外还有什么解决办法?这个问题的解决方案是什么?我已禁用FIPS,但仍然出现此错误。我记得此解决方案曾一度对我有效,但现在我无法保存对该文件的编辑,错误是该文件已在其他地方打开,或者我没有保存权限(即使在我自己的计算机上处于管理员模式)。@cr0,消息将显示的一个原因是您当前是否正在进行生成。我建议关闭Visual Studio,甚至重新启动计算机,然后再次尝试编辑该文件。您也可以尝试修改父文件夹上的权限,以防继承这些权限。对于自2013年以来与visual studio捆绑的MSBuild版本,您需要更改在
%ProgramFiles(x86)%\MSBuild\[version]
下找到的MSBuild.exe.config文件,我已在任务管理器中查找了MSBuild.exe的起始位置,然后更改了提供的.config,关闭VS,启动A并。。它起作用了!