Modified VBPROJ/CSPROJ files

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    Modified VBPROJ/CSPROJ files

    If you modify a CSPROJ or VBProj's source XML to use the UsingTask tag in order to create a new template (for example to add auto-incrementing versioning to every project I create automatically). I can save the template to the relevant directory and run devenv /setup to add my template to my visual studio build.

    All this works just peachy except for one annoyance. Every time I load a project (either new or previously created using this template) it comes up with a security warning as you're loading it and asks you to select "Open as normal" or "Open for viewing"... I understand that this is reasonable behaviour to expect, but is there any way of suppressing this behaviour for my template - either in the IDE or the template file itself? In an ideal world I would be able to mark my template as "safe" so that it didn't trigger this warning - but the more I read, the more I suspect this isn't possible and that I'll just have to set the security level in my IDE to a lower level so that it doesn't flag me for any project - but I can't find a way to do this either.

    Any ideas?
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    Microsoft recommends that when using Visual Studio 2005, you do the following:

    - Run Visual Studio with elevated administrator permissions
    - Be a member of the "Administrators " group on the local machine
    - Right-click the Visual Studio icon and select the "Run as administrator" option from the context menu

    If your problem is security/permissions, then this should fix it. HTH.

    Comment

    • balabaster
      Recognized Expert Contributor
      • Mar 2007
      • 798

      #3
      Originally posted by kenobewan
      Microsoft recommends that when using Visual Studio 2005, you do the following:

      - Run Visual Studio with elevated administrator permissions
      - Be a member of the "Administrators " group on the local machine
      - Right-click the Visual Studio icon and select the "Run as administrator" option from the context menu

      If your problem is security/permissions, then this should fix it. HTH.
      My user account is an administrator account on my local computer, so I'm not sure exactly how to alleviate the issue... aside from this, that would do it for all projects.

      Ideally what I'd like to do is register this template as safe so that I don't get flagged every time I open a project that was built on this template, but if I open another project that has a modified CSPROJ/VBPROJ file then I'd once again get flagged until I register that template. I was wondering if there's some option (like in devenv /setup) somewhere that I could register this template.

      Any further thoughts?

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        Not that I'm aware of. Anyone had this problem before and knows a solution?

        As far as I'm aware VS runs permissions based on your user account. The only option that I can think of is change the file permissions, but this would probably not work unless when saved it does not have full control through the administrator account.

        Comment

        • balabaster
          Recognized Expert Contributor
          • Mar 2007
          • 798

          #5
          Originally posted by kenobewan
          Not that I'm aware of. Anyone had this problem before and knows a solution?

          As far as I'm aware VS runs permissions based on your user account. The only option that I can think of is change the file permissions, but this would probably not work unless when saved it does not have full control through the administrator account.
          Well, I'll keep my eye open for a solution and post it here when I find it. Thanks for your help.

          Comment

          Working...