9 Replies Latest reply on Apr 10, 2014 8:53 AM by martys

    Visual Studio 2010 Publish Problems




      I have a project using visual studio that has recently developed a problem where the project builds, but will not publish.  I get an error without the usual reference to any particular piece of code that simply states:  "Object reference not set ot an instance of an object".  The reason that I am posting the problem here is that upon searching for a solution, I came upon an msdn discussion thread (link below) where there is a consensus that the problem results from a McAfee RT scan.  As I am a corporate customer without the ability to turn the scan off, I really could use some help.  Please advise.


      http://social.msdn.microsoft.com/Forums/vstudio/en-US/fe539362-547e-41bd-b7e5-f0 08de15c3e4/object-reference-not-set-to-an-instance-of-an-object-while-publishing -web-site?forum=vsdebug


      Thank You

        • 1. Re: Visual Studio 2010 Publish Problems



          I am also having the same problem. It only started happening recently, and I can't come up with a single reason that this started happening. But the link that you posted has also got me pointing in the direction of McAfee as well. We also have a corporate/enterprise version of McAfee, and I can't turn any of the features of the product off.


          I'm interested in seeing if anybody responds with a solution to this problem.






          Message was edited by: drummermike on 4/3/14 3:04:38 PM CDT
          • 2. Re: Visual Studio 2010 Publish Problems

            Charming individuals posting on that link.


            But it's evident the consensus is "it's something related to real-time scanning". That of itself is only a little helpful. Hopefully someone reporting the symptom will be in a position to actually do some troubleshooting - and if that's "You" then I suggest working with our Support team to investigate.

            • 3. Re: Visual Studio 2010 Publish Problems

              How do I work with the Support team?  Is there an email or phone number?

              • 4. Re: Visual Studio 2010 Publish Problems

                Like so -


                Contact details For contact details:

                • Go to: http://www.mcafee.com/us/about/contact/index.html

                • Non-US customers - select your country from the list of Worldwide Offices.

                Login to the Service Portal at: https://mysupport.mcafee.com:
                • If you are a registered user, type your User Id and Password and click OK.
                • If you are not a registered user, click New User and complete the required fields. Your password and login instructions will be emailed to you.

                • 5. Re: Visual Studio 2010 Publish Problems

                  I'm also seeing this problem since updating from VSE 8.8 patch 2 to patch 4.


                  The temporary workaround for me was to setup an On-Access write exclusion for the path C:\Windows\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\


                  The logs don't indicate a problem so I found this out by using a utility called FolderChangesView to see what files are being written to disk when publishing in VS2010.


                  I wasn't having this problem before so I wonder if something if it is related to a change in patch 4.



                  • 6. Re: Visual Studio 2010 Publish Problems

                    Following your advice, I have tried to contact McAfee techncial support but I do not have a "grant number" so no one will talk to me.  I am working with our IT group to see how to get such a thing, but so far no one has an answer.  I downloaded the McAfee  troubleshooting package, which gathers log data, etc. from my machine and ran it successfully, but no one to send the results to.

                    • 7. Re: Visual Studio 2010 Publish Problems

                      Interesting workaround.  Is the implicated path for the final file shown on FolderChangesView (mine is an AppData webconfig file)?  Would please provide a  bit more detail on creating a write exclusion?

                      • 8. Re: Visual Studio 2010 Publish Problems

                        I haven't narrowed it down any further than that entire folder and subfolders as yet. There are dozens of files that are created or changed in that folder during a publish on my system. There are files in appdata\local\temp but these don't seem to need an exception.


                        I'm not sure if you're using EPO or not. I am using EPO so I've set up the exclusion as a policy on the server. If you're not using EPO then you can just go into the VSE 8.8 VirusScan Console, into the properties of the On-Access Scanner, Default Processes, Exclusions.

                        • 9. Re: Visual Studio 2010 Publish Problems

                          I resolved this problem by changing the temp directory that Visual Studio uses during the build/publish process.  This can be done in the web.config file: 


                          <compilation debug="true" tempDirectory="H:\temp\vs">


                          This code uses a remote directory, and I do not know at this time if  McAfee treats the default C:\users\.... directory differently than other local directories.