none
Can't build a wpf project on a FIPS enabled system

    Question

  • System is Windows 7 Ultimate x64 with Visual Studio Pro 2012 RC

    The system has FIPS enabled in the Local Security Policy.

    I create a new WPF project, try to build it and get the following errors:

    Error 1 Unknown build error, 'This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms. Line 8 Position 3.'  c:\users\administrator\documents\visual studio 11\Projects\WpfApplication2\WpfApplication2\App.xaml  8 3 WpfApplication2
    Error 2 Unknown build error, 'This implementation is not part of the Windows Platform FIPS validated cryptographic algorithms. Line 8 Position 3.'  c:\users\administrator\documents\visual studio 11\Projects\WpfApplication2\WpfApplication2\MainWindow.xaml 8 3 WpfApplication2

    Is there anyway to build a WPF project on a FIPS enabled PC?

    Thanks,
    Vince

     

    Thursday, June 21, 2012 2:18 PM

Answers

  • Hi,

    This issue was resolved by Microsoft on 6/30/2012 on the "Microsoft Connect" site. If you have access the Issue ID is 750966.

    Here is the resolution:

    "Posted by Microsoft on 6/30/2012 at 4:00 PM

    VS 2012 now builds C# projects in a separate process that runs msbuild. The entry you added to devenv.exe.config (that worked for VS 2010) won't be seen by this process. You should add the same entry, namely
         <enforceFIPSPolicy enabled="false"/>
    to the config file for msbuild; typically that's found at
         c:\Windows\Microsoft.Net\Framework\v4.0.30319\msbuild.exe.config"

    • Marked as answer by vince429 Sunday, July 01, 2012 3:44 PM
    Sunday, July 01, 2012 3:44 PM

All replies

  • Hi vince429,

    I am working your issue, if I have new findings, I will update this thread.

    best regards,


    Sheldon _Xiao[MSFT]
    MSDN Community Support | Feedback to us
    Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, June 22, 2012 8:27 AM
    Moderator
  • Hi,

    This is a Visual Studio related issue. Could you try to add enforceFIPSPolicy element to see whether it works? (Path may be different as you're using Visual Studio 2012 RC)

    http://blogs.msdn.com/b/brijs/archive/2010/08/10/issue-getting-this-implementation-is-not-part-of-the-windows-platform-fips-validated-cryptographic-algorithms-exception-while-building-outlook-vsto-add-in-in-vs-2010.aspx


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.


    Friday, June 22, 2012 8:32 AM
    Moderator
  • Hi,

    FYI: using C#, VS2010 Ultimate and VS2012 Pro RC, login to windows as a "Standard" user but run VS as "Administrator".

    Sheldon; Hope you find something.

    Allen;

    I tried the methods in the link you provided. Here are the results:

    Method 1. I can disable FIPS in the Local Security Policy and that resolves the errors, but this is not a good solution for me (need FIPS enabled).


    Method 2. I added the "<enforceFIPSPolicy enabled="false"/>" to the .config files and did a Windows restart.

    Visual Studio Ultimate 2010; "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\devenv.exe.config"
            .
            .
            </assemblyBinding>
            <enforceFIPSPolicy enabled="false"/>
        </runtime>

    This FIXED the errors when using VS2010!

    Visual Studio Pro 2012 RC; "C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe.config"
            .
            .
            </disableNativeImageLoad>
            <enforceFIPSPolicy enabled="false"/>
        </runtime>

    This DID NOT fix the errors when using VS2012RC.

    Maybe I need to add the "enforceFIPSPolicy" in a different location for vs2012RC.

    Thanks for your time,

    vince

    Friday, June 22, 2012 2:34 PM
  • Hi,

    Could you check the location of the devenv.exe (using Task Manager, open file location) to make sure the path is correct? If the path is right I think it's probably a bug of Visual Studio 2012 RC. You can report this issue via:

    http://connect.microsoft.com/VisualStudio


    Allen Chen [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, June 25, 2012 2:15 AM
    Moderator
  • I verified the devenv.exe location/path with Task Manager. It was the same as I indicated in my previous post and is where I modified the devenv.exe.config file.

    Since I don't know what else to try I reported the issue via the Visual Studio 2012 Feedback tool.

    Issue ID: 750966

    vince

    Tuesday, June 26, 2012 5:38 PM
  • Hi,

    This issue was resolved by Microsoft on 6/30/2012 on the "Microsoft Connect" site. If you have access the Issue ID is 750966.

    Here is the resolution:

    "Posted by Microsoft on 6/30/2012 at 4:00 PM

    VS 2012 now builds C# projects in a separate process that runs msbuild. The entry you added to devenv.exe.config (that worked for VS 2010) won't be seen by this process. You should add the same entry, namely
         <enforceFIPSPolicy enabled="false"/>
    to the config file for msbuild; typically that's found at
         c:\Windows\Microsoft.Net\Framework\v4.0.30319\msbuild.exe.config"

    • Marked as answer by vince429 Sunday, July 01, 2012 3:44 PM
    Sunday, July 01, 2012 3:44 PM
  •   You must reboot Windoze, just restarting VS after change does not work

       The <enforceFIPSPolicy enabled="false"/> goes within the  <runtime> section 




    • Edited by chuck02323 Tuesday, August 21, 2012 2:29 PM
    Tuesday, August 21, 2012 1:38 PM
  • Hey, if anyone is still having this problem, I just beat my head against this repeatedly on a DoD machine.  In VS 2012 Update 1, you must do EVERYTHING listed here.  In other words, you must inject the <enforceFIPSPolicy enabled="false"/> setting into the <configuration>/<runtime> section of all of the files listed above.  For good measure, I put it in:

    C:\Windows\Microsoft.Net\Framework\v.4.0.30319\msbuild.exe.config
    C:\Windows\Microsoft.Net\Framework64\v.4.0.30319\msbuild.exe.config

    -and-

    C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.exe.config

    If you don't do *everything* it will not work.

    Saturday, February 23, 2013 9:09 PM
  • I just did everything the last post suggested and it still isn't working.  
    Tuesday, February 25, 2014 8:07 PM
  • I'm having this same problem:

    Windows 7 Professional SP1

    Visual Studio 13 Professional Update 4

    Create new WPF project.

    Build

    Get same error as above.

    I've tried all of the solutions mentioned here, still have the same problem.  Have added the following to both Framework and Framework64 versions of msbuild.exe.config for the most recent version of .net.  Also added same line to devenv.exe.config.  Edits were made immediately prior to the </runtime> tag.

    <enforceFIPSPolicy enabled="false"/>

    Tried again having restarted computer.

    I have another version of Visual Studio (2008) also installed.

    Wednesday, January 14, 2015 12:38 AM
  • SOLVED!!!!

    Almost three years after the first post, I just experienced the issue and got to solve it. I really hope this helps.

    I went through many posts and answers, and the solutions turn around the same: modify your devenv.exe.config or your msbuild.exe.config file. They are on the right track, however I found one particular case not covered in the answers that solved my issue.

    Based on another post that was suggesting to use the task manager, I found the clue to solve the problem I was having. In my case, it was to locate the REAL execution path of msbuild.exe. It happens that the msbuild was not running from the Framework folder as expected, it was executing from C:\Program Files (x86)\MSBuild\12.0\Bin . I don't know how it got there, but the fact is that there is an msbuild.exe.config file there and THAT IS THE ONE that needed to be updated.

    You have to close Visual Studio after applying the change.

    Obviously, I left the other config files also updated with this setting to avoid this issue to occur under different circumstances.

    In other words, the suggestion of adding <enforceFIPSPolicy enabled="false"/> still applies to all your visual studio paths as mentioned in many other posts, just make sure to ALSO apply it to the msbuild.exe and the devenv.exe paths that will actually take on the job in your specific configuration.

    I used task manager to locate that path while building a big solution.

    • Proposed as answer by Majdoleen Odeh Thursday, October 29, 2015 8:55 AM
    Monday, April 27, 2015 4:37 PM
  • Thank you so much it did not work until I updated the msbuild.exe.config in the path you specified.
    Thursday, October 29, 2015 8:59 AM