Internal error while adding a new checkIn policy for VS2008 in Windows 7 - checkin-policy

I have created a CheckIn policy using Visual C# 2008 and i am trying to add it to VS2008 checkIn policies in Windows 7. I have created a key(CheckForCommentsPolicy) in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\9.0\TeamFoundation\SourceControl\Checkin Policies and added value \CheckForCommentsPolicy.dll. After i opened VS2008 and i cant find newly added policy in the source control!.Later I found out that i had referenced a new version of Microsoft.TeamFoundation.VersionControl.Client.dll file.So i added reference to same version of .dll.Now checkIn policy is visible in list but while adding some internal error occuring.
Same code built in VS2012 is working fine in VS2012.
Why its not working in VS2008?anything i am missing?

Related

Visual Studio 2013 - The name 'X' does not exist in the current context

I'm using Microsoft Visual Studio 2013 professional on a windows 10 laptop and I am seeing an error in all my razor views. The error says the name 'X' does not exist in the current context e.g. The name 'Html' does not exist in the current context.
From searching the internet for solutions I have tried the following but still not fixed
Run visual studio repair form control panel (uninstall programs)
Run Windows update
Checked that the references are set to copy local
Deleted my .suo file, cleaned and rebuilt
Tried fully qualified namespaces
Razor versions are 3.0 in both config and view config
Unload Reload the project
Reset all my settings using import and export settings wizard
Cleaned all packages and cleared package cache
The error looks like so
Can anyone suggest anything else apart from uninstalling and then reinstalling? Despite these errors in my views the application will still build and run in the browser with no ysod.
SIMILAR ISSUE "The name 'HTML' does not exist in the current context" in MVC 3 Views
EDIT - Using info from stackoverflow.com/questions/20422007/… if i go to project properties and make a space in assembly name and save and rebuild then it works!! However as soon as i close VS down and start it up again the issue persists
Thanks
Paul
How sure are you that this is a visual studio issue, and not related to the project? Does it work in other versions of Visual Studio? Do you have the .Net framework installed? (Ensure your project is pointing to the correct .net framework version that you have installed, which you can check in the project properties).
Is the assembly reference in question that's missing, present in the bin folder of your solution?

VS2017 RC - The following error occurred when trying to configure IIS Express

Installed VS2017 RC - Started New Project ASP.NET Core Web Aplication(.Net CORE), selected Individual User Accounts as Authentication type. Try to run code generated with no changes and got the following error: Error occurred when trying to configure IIS Express for project... Error: ../.vs/config/applicationhost.config Error: cannot write configuration file
Looked at that file and it appears that it should have been writable.
FYI using VS2015 Update 3 everything builds and runs as expected including IIS Express.
I have encountered the same issue but deleting .vs folder worked for me.
I was having this issue, but only after the recent updated to Visual Studio 2017 RC (12/12/16).
I searched for a good hour and really didn't find anything, so I simply downloaded the latest IIS Express (v10) and it seems to have corrected the issues for 2017, but also for 2015 that started after the update as well.
IIS Express Download
EFS (Encryption File System) is known to cause file access problems. Ensure that EFS is turned off in your project directory.
More information:
https://blog.danielsmon.com/2017/04/03/cant-write-to-applicationhost-config/

TFS source code binding issue

I have migrated a MVC4 web application version controlled in VSS 2005 to TFS 2015 and that migration is successful.
Then I tried to open the project in VS 2010 (Since VS2015 does not support)
It gives me following error. How do I connect to TFS successfully
Error message:
The solution appears to be under source control, but its binding
information cannot be found. It is possible that the MSSCCPRJ.SCC file
or another item that holds the source control settings for the
solution, has been deleted. Because it is not possible to recover this
missing information automatically, the projects whose bindings are
missing will be treated as not under source control.
Using:
Windows server 2012 + Updates
SQL 2014
TFS 2015 (Version 14.0.24712.0)
Open file - Source Control - Change Source Control... Select all projects and click the Bind... button. That should re-create the binding, if the files are in a valid TFS workspace.
Since you're mixing and matching VS2010 and VS2015, you may first need to set your workspace to "Server" instead of the default for 2015's "Local". VS2010 doesn't support local workspaces. You can change this setting from Visual Studio 2015 only.

Check-in policy error with VS 2012 and TFS 2010 - CheckForWarningsPolicy

We were using Team Foudation Server 2010 with Visual Studio 2010 for every project we made in our company. We created some post build events, some check-in policies and everything was working correctly.
Recently we moved to Visual Studio Professional 2012 (Version 11.0.51106.06 Update 1) and now, everytime we try to check-in some code, we get this error:
Internal error in Check for Compilation Warnings and Errors Policy. Error loading the Check for Compilation Warnings and Errors Policy policy (The policy assembly 'CheckForWarningsPolicy, Version=2.1.0.0, Culture=neutral, PublicKeyToken=342882479c9e5e25' is not registered.). Installation instructions: To install this policy, please read ReadMe.txt.
Error loading the Check for Compilation Warnings and Errors Policy policy (The policy assembly 'CheckForWarningsPolicy, Version=2.1.0.0, Culture=neutral, PublicKeyToken=342882479c9e5e25' is not registered.). Installation instructions: To install this policy, please read ReadMe.txt.
ReadMe.txt that is cited in the end of the error is not reachable, there is no link or indication where the file is.
I've searched for this answer in google and here, but without any luck. Probably I'm making the wrong search.
I read some questions like:
Custom policies in Visual Studio 2012 and TFS 2010
TFS 2012 and VS 2010
But none of them worked for me. What can I do to solve this error?
Thank's
I "solved" the error and I'll post what I did so anyone who's facing the same problem can learn from my experience.
To create this check-in policy in Visual Studio 2010 we used a custom policy developed by Jeff Bramwell (link to MSDN profile). This policy, apparently, it's not being maintained by him as you can see in the policy page in MSDN. I asked a question in the page and sent him a tweet, now I'll wait for his answer.
Testing this policy in Visual Studio 2010 I checked that it was not working, so, I just removed it from the Project in Project > Settings > Source Control > Check-in Policy.
If I need something more detailed, I can add a Code Analysis check-in policy as described in the Stack Overflow question about Prevent check-in if code analysis warning exists. With this approach I can even set a custom rule.
Hope this will help someone with the same problem.
You will have to install your 2010 checkin policies in 2012. The simplest way is to register the existing assemblies in the Visual Studio 2012 registry hyve on every machine that uses the checkin policy. And then see whether they now also work in Visual Studio 2012. You can try to use a binding redirection to resolve any versioning issues. The process for setting up the binding redirections is explained in this blog post.
Should you be using API's that have changes with Visual Studio 2012, then you might have to compile a new version of the Checkin Policy and register that in the 2012 registry hyve of each machine using the checkin policy.
The blog post I already referenced, also explains which registry hyve you'll need to register your policies under.
you need to recompile the policy under 2012 studio because the TFS API in it is different - assembly version is 11.0 and in 2010 is 10.0

"Add SSIS Connection Manager" Dialog Doesn't Contain Custom Connection Manager

I am attempting to create a custom connection manager for performing SFTP operations from within SSIS. I have completed implementation, strong-named my assembly and installed it in both the GAC and the C:\Program Files\Microsoft SQL Server\90\DTS\Connections folder. The problem is that the "Add SSIS Connection Manager" dialog doesn't show my new connection type and I'm at a loss as to how to diagnose this issue. So far I have ensured that Everyone has Full Control to the C:\Program Files\Microsoft SQL Server\90\DTS\Connections folder.
Possibly related to this issue is that I cannot see the assembly when I browse the GAC, even though the gacutil program reports success when I run it to add the assembly.
What steps could I follow to diagnose the root cause of this issue? Is there anything else that I need to check to make it possible to add a add a custom connection manager?
EDIT: I should also note that the custom connection manager is compiled using .NET 4.0. This is why I cannot see the assembly in the GAC after installing it I believe, as the assembly is being placed in the %WINDIR%\Microsoft.NET\assembly folder rather than the %WINDIR%\assembly folder. I am using .NET 4.0 because of this issue.
EDIT #2: It turns out that if I create my custom connection manager in a Visual Studio 2008 project, compiled against .NET 3.5 then everything works fine. (Apparently using Visual Studio 2008 is a workaround for the version issue linked above.) So the real question now is why the SSIS Designer doesn't pick up .NET 4.0 custom tasks and connection managers.
Did you add it to the toolbox? The doco has this as a mandatory step.
Also, you must close and reopen SSIS Designer after you install a new or new version of a custom object.
You could also try resetting the toolbox.

Resources