Search Results

Search found 417 results on 17 pages for 'visualstudio'.

Page 5/17 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Using IIS Logs for Performance Testing with Visual Studio

    - by Tarun Arora
    In this blog post I’ll show you how you can play back the IIS Logs in Visual Studio to automatically generate the web performance tests. You can also download the sample solution I am demo-ing in the blog post. Introduction Performance testing is as important for new websites as it is for evolving websites. If you already have your website running in production you could mine the information available in IIS logs to analyse the dense zones (most used pages) and performance test those pages rather than wasting time testing & tuning the least used pages in your application. What are IIS Logs To help with server use and analysis, IIS is integrated with several types of log files. These log file formats provide information on a range of websites and specific statistics, including Internet Protocol (IP) addresses, user information and site visits as well as dates, times and queries. If you are using IIS 7 and above you will find the log files in the following directory C:\Interpub\Logs\ Walkthrough 1. Download and Install Log Parser from the Microsoft download Centre. You should see the LogParser.dll in the install folder, the default install location is C:\Program Files (x86)\Log Parser 2.2. LogParser.dll gives us a library to query the iis log files programmatically. By the way if you haven’t used Log Parser in the past, it is a is a powerful, versatile tool that provides universal query access to text-based data such as log files, XML files and CSV files, as well as key data sources on the Windows operating system such as the Event Log, the Registry, the file system, and Active Directory. More details… 2. Create a new test project in Visual Studio. Let’s call it IISLogsToWebPerfTestDemo.   3.  Delete the UnitTest1.cs class that gets created by default. Right click the solution and add a project of type class library, name it, IISLogsToWebPerfTestEngine. Delete the default class Program.cs that gets created with the project. 4. Under the IISLogsToWebPerfTestEngine project add a reference to Microsoft.VisualStudio.QualityTools.WebTestFramework – c:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.WebTestFramework.dll LogParser also called MSUtil - c:\users\tarora\documents\visual studio 2010\Projects\IisLogsToWebPerfTest\IisLogsToWebPerfTestEngine\obj\Debug\Interop.MSUtil.dll 5. Right click IISLogsToWebPerfTestEngine project and add a new classes – IISLogReader.cs The IISLogReader class queries the iis logs using the log parser. using System; using System.Collections.Generic; using System.Text; using MSUtil; using LogQuery = MSUtil.LogQueryClassClass; using IISLogInputFormat = MSUtil.COMIISW3CInputContextClassClass; using LogRecordSet = MSUtil.ILogRecordset; using Microsoft.VisualStudio.TestTools.WebTesting; using System.Diagnostics; namespace IisLogsToWebPerfTestEngine { // By making use of log parser it is possible to query the iis log using select queries public class IISLogReader { private string _iisLogPath; public IISLogReader(string iisLogPath) { _iisLogPath = iisLogPath; } public IEnumerable<WebTestRequest> GetRequests() { LogQuery logQuery = new LogQuery(); IISLogInputFormat iisInputFormat = new IISLogInputFormat(); // currently these columns give us suffient information to construct the web test requests string query = @"SELECT s-ip, s-port, cs-method, cs-uri-stem, cs-uri-query FROM " + _iisLogPath; LogRecordSet recordSet = logQuery.Execute(query, iisInputFormat); // Apply a bit of transformation while (!recordSet.atEnd()) { ILogRecord record = recordSet.getRecord(); if (record.getValueEx("cs-method").ToString() == "GET") { string server = record.getValueEx("s-ip").ToString(); string path = record.getValueEx("cs-uri-stem").ToString(); string querystring = record.getValueEx("cs-uri-query").ToString(); StringBuilder urlBuilder = new StringBuilder(); urlBuilder.Append("http://"); urlBuilder.Append(server); urlBuilder.Append(path); if (!String.IsNullOrEmpty(querystring)) { urlBuilder.Append("?"); urlBuilder.Append(querystring); } // You could make substitutions by introducing parameterized web tests. WebTestRequest request = new WebTestRequest(urlBuilder.ToString()); Debug.WriteLine(request.UrlWithQueryString); yield return request; } recordSet.moveNext(); } Console.WriteLine(" That's it! Closing the reader"); recordSet.close(); } } }   6. Connect the dots by adding the project reference ‘IisLogsToWebPerfTestEngine’ to ‘IisLogsToWebPerfTest’. Right click the ‘IisLogsToWebPerfTest’ project and add a new class ‘WebTest1Coded.cs’ The WebTest1Coded.cs inherits from the WebTest class. By overriding the GetRequestMethod we can inject the log files to the IISLogReader class which uses Log parser to query the log file and extract the web requests to generate the web test request which is yielded back for play back when the test is run. namespace IisLogsToWebPerfTest { using System; using System.Collections.Generic; using System.Text; using Microsoft.VisualStudio.TestTools.WebTesting; using Microsoft.VisualStudio.TestTools.WebTesting.Rules; using IisLogsToWebPerfTestEngine; // This class is a coded web performance test implementation, that simply passes // the path of the iis logs to the IisLogReader class which does the heavy // lifting of reading the contents of the log file and converting them to tests. // You could have multiple such classes that inherit from WebTest and implement // GetRequestEnumerator Method and pass differnt log files for different tests. public class WebTest1Coded : WebTest { public WebTest1Coded() { this.PreAuthenticate = true; } public override IEnumerator<WebTestRequest> GetRequestEnumerator() { // substitute the highlighted path with the path of the iis log file IISLogReader reader = new IISLogReader(@"C:\Demo\iisLog1.log"); foreach (WebTestRequest request in reader.GetRequests()) { yield return request; } } } }   7. Its time to fire the test off and see the iis log playback as a web performance test. From the Test menu choose Test View Window you should be able to see the WebTest1Coded test show up. Highlight the test and press Run selection (you can also debug the test in case you face any failures during test execution). 8. Optionally you can create a Load Test by keeping ‘WebTest1Coded’ as the base test. Conclusion You have just helped your testing team, you now have become the coolest developer in your organization! Jokes apart, log parser and web performance test together allow you to save a lot of time by not having to worry about what to test or even worrying about how to record the test. If you haven’t already, download the solution from here. You can take this to the next level by using LogParser to extract the log files as part of an end of day batch to a database. See the usage trends by user this solution over a longer term and have your tests consume the web requests now stored in the database to generate the web performance tests. If you like the post, don’t forget to share … Keep RocKiNg!

    Read the article

  • TF30004: The New Team Project Wizard encountered an unexpected error while initializing the Microsof

    - by Frozzare
    Hello, i get this error when i trying to create a new project in team project. The server is right, i check all ports. I don't now what i should do now, can't find any good information 2009-09-19 01:45:41Z | Module: Internal | Team Foundation Server proxy retrieved | Completion time: 0.338 seconds 2009-09-19 01:45:41Z | Module: Internal | The template information for Team Foundation Server "TFSServer01" was retrieved from the Team Foundation Server. | Completion time: 0.099 seconds 2009-09-19 01:45:41Z | Module: Wizard | Retrieved IAuthorizationService proxy | Completion time: 0.404 seconds 2009-09-19 01:45:41Z | Module: Wizard | TF30227: Project creation permissions retrieved | Completion time: 0.015 seconds 2009-09-19 01:45:44Z | Module: Engine | Thread: 5 | New project will be created with the "MSF for Agile Software Development - v4.2" methodology 2009-09-19 01:45:44Z | Module: Engine | Retrieved IAuthorizationService proxy | Completion time: 0 seconds 2009-09-19 01:45:44Z | Module: Engine | TF30227: Project creation permissions retrieved | Completion time: 0.01 seconds 2009-09-19 01:45:45Z | Module: Engine | Wrote compressed process template file | Completion time: 0.001 seconds 2009-09-19 01:45:46Z | Module: Engine | Extracted process template file | Completion time: 1.428 seconds 2009-09-19 01:45:46Z | Module: Engine | Thread: 5 | Starting Project Creation for project "TestProject" in domain "TFSServer01" 2009-09-19 01:45:46Z | Module: Engine | The user identity information was retrieved from the Group Security Service | Completion time: 0.045 seconds 2009-09-19 01:45:46Z | Module: Initializer | Thread: 5 | The New Team Project Wizard is starting to initialize the plug-ins. 2009-09-19 01:45:46Z | Module: CssStructureUploader | Thread: 5 | Entering Initialize in CssStructureUploader 2009-09-19 01:45:46Z | Module: CssStructureUploader | Thread: 5 | Initialize for CssStructureUploader complete 2009-09-19 01:45:46Z | Module: Initializer | Thread: 5 | The New Team Project Wizard successfully Initialized the plug-in Microsoft.ProjectCreationWizard.Classification. 2009-09-19 01:45:46Z | Module: Rosetta | Thread: 5 | Entering Initialize in RosettaReportUploader 2009-09-19 01:45:48Z | Module: Rosetta | Thread: 5 | Exiting Initialize for RosettaReportUploader 2009-09-19 01:45:48Z | Module: Initializer | Thread: 5 | The New Team Project Wizard successfully Initialized the plug-in Microsoft.ProjectCreationWizard.Reporting. 2009-09-19 01:45:48Z | Module: WSS | Thread: 5 | Entering Initialize in WssSiteCreator 2009-09-19 01:45:48Z | Module: WSS | Thread: 5 | Site information: Title = "TestProject" Description = "This team project was created based on the 'MSF for Agile Software Development - v4.2' process template." 2009-09-19 01:45:48Z | Module: WSS | Thread: 5 | Base site url: http://TFSServer01:14143/webbplatser 2009-09-19 01:45:48Z | Module: WSS | Thread: 5 | Admin site url: http://TFSServer01:16183/_vti_adm/admin.asmx ---begin Exception entry--- Time: 2009-09-19 01:46:27 Z Module: Initialize Event Description: TF30207: Initialization for plugin "Microsoft.ProjectCreationWizard.Portal 'failed Exception Type: Microsoft.TeamFoundation.Client.PcwException Exception Message: The client discovered that content-type of request is text / html; charset = utf-8, but the text / xml expected. The request failed with error message: -- Unable to connect to the configuration database. --. Stack Trace: vid Microsoft.VisualStudio.TeamFoundation.WssSiteCreator.CheckPermissions(ProjectCreationContext ctxt) vid Microsoft.VisualStudio.TeamFoundation.WssSiteCreator.Initialize(ProjectCreationContext context) vid Microsoft.VisualStudio.TeamFoundation.EngineStarter.InitializePlugins(MsfTemplate template, PcwPluginCollection pluginCollection) -- Inner Exception -- Exception Type: System.InvalidOperationException Exception Message: The client discovered that content-type of request is text / html; charset = utf-8, but the text / xml expected. The request failed with error message: -- Unable to connect to the configuration database. --. Stack Trace: vid System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) vid System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) vid Microsoft.TeamFoundation.Proxy.Portal.Admin.GetLanguages() vid Microsoft.VisualStudio.TeamFoundation.WssSiteCreator.CheckPermissions(ProjectCreationContext ctxt) -- end Inner Exception -- --- end Exception entry --- Thanks for you help

    Read the article

  • ClickOnce: The required version of the .NET Framework is not installed on this computer

    - by Martin
    I have been getting the error "The required version of the .NET Framework is not installed on this computer." (Event Id 4096 in Event log) when trying to install a VSTO application from both a ClickOnce deployment and a local copy. This is interesting as the .NET framework is installed (on my 32bit Windows 7 PC) and the VSTO application was developed on the self same machine (and works in Visual Studio 2008). Does anybody has an idea why I could get this exception? Name: From: http://localhost/BlaBla.vsto "The required version of the .NET Framework is not installed on this computer." ********** Exception Text ********** Microsoft.VisualStudio.Tools.Applications.Deployment.InstallAddInFailedException: "The required version of the .NET Framework is not installed on this computer." at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn() at Microsoft.VisualStudio.Tools.Office.Runtime.SolutionInstaller.<c__DisplayClass7.b__0()

    Read the article

  • Installing Office Customization

    - by user187229
    Name: From: file:///D:/Samples/TestUpdatedVersion/bin/Debug/TestUpdatedVersion.vsto The customization cannot be installed because another version is currently installed and cannot be upgraded from this location. To install this version of the customization, first use Add or Remove Programs to uninstall this program: TestUpdatedVersion. Then install the new customization from the following location: file:///D:/Samples/TestUpdatedVersion/bin/Debug/TestUpdatedVersion.vsto ********** Exception Text ********** Microsoft.VisualStudio.Tools.Applications.Deployment.AddInAlreadyInstalledException: The customization cannot be installed because another version is currently installed and cannot be upgraded from this location. To install this version of the customization, first use Add or Remove Programs to uninstall this program: TestUpdatedVersion. Then install the new customization from the following location: file:///D:/Samples/TestUpdatedVersion/bin/Debug/TestUpdatedVersion.vsto at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.VerifySolutionCodebaseIsUnchanged(Uri uri, String subscriptionId, Boolean previouslyInstalled) at Microsoft.VisualStudio.Tools.Applications.Deployment.ClickOnceAddInDeploymentManager.InstallAddIn()

    Read the article

  • Cannot run unit tests for an application developed with Compact Framework for Windows CE 6.0 platfor

    - by Thomasek
    I'm developing a solution for Windows CE 6.0 using GuD_AtomKit X86 Device emulator. I'm not able to run any unit tests, because I get following error message: The test adapter ('Microsoft.VisualStudio.TestTools.TestTypes.Unit.UnitTestAdapter, Microsoft.VisualStudio.QualityTools.Tips.UnitTest.Adapter, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a') required to execute this test could not be loaded. Check that the test adapter is installed properly. Exception of type 'Microsoft.VisualStudio.SmartDevice.TestHostAdapter.DeviceAgent.TestAlreadyRunningException' was thrown. But there's no unit test running on the device. I would really appreciate your help.

    Read the article

  • [Silverlight] Suggestion – Move INotifyCollectionChanged from System.Windows.dll to System.dll

    - by Benjamin Roux
    I just submitted a suggestion on Microsoft Connect to move the INotifyCollectionChanged from System.Windows.dll to System.dll. You can review it here: https://connect.microsoft.com/VisualStudio/feedback/details/560184/move-inotifycollectionchanged-from-system-windows-dll-to-system-dll Here’s the reason why I suggest that. Actually I wanted to take advantages of the new feature of Silverlight/Visual Studio 2010 for sharing assemblies (see http://blogs.msdn.com/clrteam/archive/2009/12/01/sharing-silverlight-assemblies-with-net-apps.aspx). Everything went fine until I try to share a custom collection (with custom business logic) implementing INotifyCollectionChanged. This modification has been made in the .NET Framework 4 (see https://connect.microsoft.com/VisualStudio/feedback/details/488607/move-inotifycollectionchanged-to-system-dll) so maybe it could be done in Silverlight too. If you think this is justifiable you can vote for it.

    Read the article

  • Visual Studio 2010 Professional special launch offer!

    - by Etienne Tremblay
    Hello everyone, long time no blog… I’ll try to get back in the game soon but with 2 customer and user group and life in general let’s just say I’m busy.  In the meantime I’m passing along this great offer. Microsoft Visual Studio 2010 Professional will launch on April 12 but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of $549, a saving of $250. If you use a previous version of Visual Studio or any other development tool then you are eligible for this upgrade. Along with all the great new features in Visual Studio 2010 (see www.microsoft.com/visualstudio) Visual Studio 2010 Professional includes a 12-month MSDN Essentials subscription which gives you access to core Microsoft platforms: Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, and Microsoft SQL Server 2008 R2 Datacenter. So visit http://www.microsoft.com/visualstudio/en-us/pre-order-visual-studio-2010 to check out all the new features and sign up for this great offer.   Cheers, ET Technorati Tags: VS2010

    Read the article

  • Make sure you take advantage of Visual Studio 2010 license offers before April 12th

    - by Aaron Kowall
    For Visual Studio 2010 Professional Microsoft Visual Studio 2010 Professional will launch on April 12 but you can beat the rush and secure your copy today by pre-ordering at the affordable estimated retail price of $549, a saving of $250. If you use a previous version of Visual Studio or any other development tool then you are eligible for this upgrade. Along with all the great new features in Visual Studio 2010 (see www.microsoft.com/visualstudio) Visual Studio 2010 Professional includes a 12-month MSDN Essentials subscription which gives you access to core Microsoft platforms: Windows 7 Ultimate, Windows Server 2008 R2 Enterprise, and Microsoft SQL Server 2008 R2 Datacenter. So visit http://www.microsoft.com/visualstudio/en-us/pre-order-visual-studio-2010 to check out all the new features and sign up for this great offer. Ultimate Offer for MSDN Subscribers Also, don’t forget about the Ultimate Offer which basically gives you the opportunity to use a higher end Visual Studio SKU for the duration of your MSDN agreement.  Make sure you review your MSDN license BEFORE APRIL 12th to make sure you are in the right spot to maximize this benefit. Technorati Tags: VS 2010

    Read the article

  • Some post-VS2010 Launch Resources

    Here are some useful links related to the Vermont .NET VS2010 launch meeting on Monday night with our RECORD Breaking attendance! :) MSDN Visual Studio Developer Center: msdn.microsoft.com/vstudio VS2010 Comparison of various SKUs: http://www.microsoft.com/visualstudio/en-us/products VS2010 Trial Downloads: http://www.microsoft.com/visualstudio/en-us/download Great links from MicrosoftFeed.Com VS2010 Wallpapers for the hardcore: 10+ Beautiful Microsoft Visual Studio 2010 Wallpapers …and...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • What usability issues have you had with VS2010?

    - by makerofthings7
    A few of my friends have noticed some quirks with vs2010... notably the Undo/Redo feature doesn't seem to work reliably... often messing up the code beyond comprehension. What other quirks have you seen? Update for vs2010 users (non SP1) Please post your bugs at Microsoft connect, and a corresponding link here so we can up vote them as needed. https://connect.microsoft.com/VisualStudio?wa=wsignin1.0 Update for VS2010 SP1 Users You can download the SP1 for all versions of Visual Studio here. Just be aware that there are compatibility issues mentioned in the readme. Also some people have reported issues with this release. Please report bugs here: https://connect.microsoft.com/VisualStudio?wa=wsignin1.0

    Read the article

  • "Invalid provider type specified" when signing clickonce manifest in VS2008

    - by Mark
    I have a certificate issued by a CA on our intranet (it's a V3 sha1 pfx file). When I use this in the signing part of my clickonce (vsto addin) project, I get the error: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v9.0\OfficeTools\Microsoft.VisualStudio.Tools.Office.Office2007.targets(250,9): error MSB3482: An error occurred while signing: Invalid provider type specified. Does anyone know what's going on here? Thanks!

    Read the article

  • Right-margin marks in VS2010 text editors

    - by nc97217
    In VS2008, you could enable right-margin marks by creating a string registry entry named Guides under HKCU\Software\Microsoft\VisualStudio\9.0\Text Editor. It also worked with the express editions: replace VisualStudio with VCExpress or VCSExpress. The value I had was: RGB(192,192,192) 80, 100 which gave me light gray lines at columns 80 and 100. I've just tried (and failed) to set them up in VC++2010 Express and VC#2010 Express; does anyone know if they're still supported?

    Read the article

  • How do I get rid of "API restriction UnitTestFramework.dll already loaded" error?

    - by Kevin Driedger
    The following error pops up every now and then: C:\Program Files\MSBuild\Microsoft\VisualStudio\v9.0\TeamTest\Microsoft.TeamTest.targets(14,5): error : API restriction: The assembly 'file:///C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll' has already loaded from a different location. It cannot be loaded from a new location within the same appdomain. How do I get rid of it?

    Read the article

  • IVsEditorAdaptersFactoryService.CreateVsTextViewAdapter throws an object null reference

    - by Adam Driscoll
    I'm trying to create a IVsTextViewAdpater with the IVsEditorAdaptersFactoryService but when I call CreateVsTextViewAdapter it throws an object null reference: var editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>(); var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)this; var view = editorFactory.CreateVsTextViewAdapter(serviceProvider); 'this' is a Microsoft.VisualStudio.Shell.Package implementation. Any ideas?

    Read the article

  • Resharper 4.5 and dotTrace 3.1 integration problem

    - by Ken Egozi
    Hi. I am not able to get Resharper profile a unit test, although I have dotTrace installed on my machine. Actually, the dotTrace button in VisualStudio is also greyed out. the VisualStudio AddIns menu list dotTrace as started. VS2008 sp1 Windows 7 64bit R# 4.5 dotTrace 3.1 I tried Restarts, Reinstall, Re-whatever. Has anyone experienced that also? Does anyone has a solution for that?

    Read the article

  • Remote controller load testing

    - by SonOfOmer
    Hi everyone, I am trying to run a load test from remote controller and I get this error. Failed to queue test run 'username@computername 2010-04-15 06:06:03': Object of type 'Microsoft.VisualStudio.TestTools.LoadTesting.LoadTestConstantLoadProfile' cannot be converted to type 'Microsoft.VisualStudio.TestTools.WebStress.WebTestLoadProfile'. Running unit test from remote controller works just fine. Thanks.

    Read the article

  • Auto-formatting tool for VBscript

    - by katmoon
    I'm looking for a light, free tool to format my Vbscript code. The only way I've found so far is to auto-format it in VisualStudio. Although, it's too much to launch VisualStudio for this purpose. Is there any web app or a free light tool for this purpose? Maybe a plugin for Notepad++?

    Read the article

  • Is it possible to control Visual Studio exception handling from the debugged code itself?

    - by mark
    Dear ladies and sirs. I am wondering if it is possible to control the Visual Studio exception handling options from the code itself. For instance, I would like to turn off stopping on FCE for a certain piece of code, that generates many FCE, however, I would like it to be active for all the other code. Is it possible to do it from code? Something like this: visualStudio.DoNotStopOnFCE() try { // some code generating many FCE } catch {} visualStudio.StopOnFCE() Thanks.

    Read the article

  • Explain to me the following VS 2010 Extension Sample code..

    - by ealshabaan
    Coders, I am building a VS 2010 extension and I am experimenting around some of the samples that came with the VS 2010 SDK. One of the sample projects is called TextAdornment. In that project there is a weirdo class that looks like the following: [Export(typeof(IWpfTextViewCreationListener))] [ContentType("text")] [TextViewRole(PredefinedTextViewRoles.Document)] internal sealed class TextAdornment1Factory : IWpfTextViewCreationListener While I was experimenting with this project, I tried to debug the project to see the flow of the program and I noticed that this class gets hit when I first start the debugging. Now my question is the following: what makes this class being the first class to get called when VS starts? In other words, why this class gets active and it runs as of some code instantiate an object of this class type? Here is the only two files in the sample project: TextAdornment1Factory.cs using System.ComponentModel.Composition; using Microsoft.VisualStudio.Text.Editor; using Microsoft.VisualStudio.Utilities; namespace TextAdornment1 { #region Adornment Factory /// /// Establishes an to place the adornment on and exports the /// that instantiates the adornment on the event of a 's creation /// [Export(typeof(IWpfTextViewCreationListener))] [ContentType("text")] [TextViewRole(PredefinedTextViewRoles.Document)] internal sealed class TextAdornment1Factory : IWpfTextViewCreationListener { /// /// Defines the adornment layer for the adornment. This layer is ordered /// after the selection layer in the Z-order /// [Export(typeof(AdornmentLayerDefinition))] [Name("TextAdornment1")] [Order(After = PredefinedAdornmentLayers.Selection, Before = PredefinedAdornmentLayers.Text)] [TextViewRole(PredefinedTextViewRoles.Document)] public AdornmentLayerDefinition editorAdornmentLayer = null; /// <summary> /// Instantiates a TextAdornment1 manager when a textView is created. /// </summary> /// <param name="textView">The <see cref="IWpfTextView"/> upon which the adornment should be placed</param> public void TextViewCreated(IWpfTextView textView) { new TextAdornment1(textView); } } #endregion //Adornment Factory } TextAdornment1.cs using System.Windows; using System.Windows.Controls; using System.Windows.Media; using Microsoft.VisualStudio.Text; using Microsoft.VisualStudio.Text.Editor; using Microsoft.VisualStudio.Text.Formatting; namespace TextAdornment1 { /// ///TextAdornment1 places red boxes behind all the "A"s in the editor window /// public class TextAdornment1 { IAdornmentLayer _layer; IWpfTextView _view; Brush _brush; Pen _pen; ITextView textView; public TextAdornment1(IWpfTextView view) { _view = view; _layer = view.GetAdornmentLayer("TextAdornment1"); textView = view; //Listen to any event that changes the layout (text changes, scrolling, etc) _view.LayoutChanged += OnLayoutChanged; _view.Closed += new System.EventHandler(_view_Closed); //selectedText(); //Create the pen and brush to color the box behind the a's Brush brush = new SolidColorBrush(Color.FromArgb(0x20, 0x00, 0x00, 0xff)); brush.Freeze(); Brush penBrush = new SolidColorBrush(Colors.Red); penBrush.Freeze(); Pen pen = new Pen(penBrush, 0.5); pen.Freeze(); _brush = brush; _pen = pen; } void _view_Closed(object sender, System.EventArgs e) { MessageBox.Show(textView.Selection.IsEmpty.ToString()); } /// <summary> /// On layout change add the adornment to any reformatted lines /// </summary> private void OnLayoutChanged(object sender, TextViewLayoutChangedEventArgs e) { foreach (ITextViewLine line in e.NewOrReformattedLines) { this.CreateVisuals(line); } } private void selectedText() { } /// <summary> /// Within the given line add the scarlet box behind the a /// </summary> private void CreateVisuals(ITextViewLine line) { //grab a reference to the lines in the current TextView IWpfTextViewLineCollection textViewLines = _view.TextViewLines; int start = line.Start; int end = line.End; //Loop through each character, and place a box around any a for (int i = start; (i < end); ++i) { if (_view.TextSnapshot[i] == 'a') { SnapshotSpan span = new SnapshotSpan(_view.TextSnapshot, Span.FromBounds(i, i + 1)); Geometry g = textViewLines.GetMarkerGeometry(span); if (g != null) { GeometryDrawing drawing = new GeometryDrawing(_brush, _pen, g); drawing.Freeze(); DrawingImage drawingImage = new DrawingImage(drawing); drawingImage.Freeze(); Image image = new Image(); image.Source = drawingImage; //Align the image with the top of the bounds of the text geometry Canvas.SetLeft(image, g.Bounds.Left); Canvas.SetTop(image, g.Bounds.Top); _layer.AddAdornment(AdornmentPositioningBehavior.TextRelative, span, null, image, null); } } } } } }

    Read the article

  • Installing VSTO 4.0 Causes VSTO 3.0 Addin to quit working

    - by Jacob Adams
    I just installed Visual Studio 2010 yesterday. As part of that I installed VSTO 4.0. Now when I run any Office application, my VSTO 3.0 addins fail to load. The error in the event log is Customization URI: file:///H:/PathToMyAddin/MyAddin.vsto Exception: Customization does not have the permissions required to create an application domain. ***** Exception Text ******* Microsoft.VisualStudio.Tools.Applications.Runtime.CannotCreateCustomizationDomainException: Customization does not have the permissions required to create an application domain. --- System.Security.SecurityException: Customized functionality in this application will not work because the administrator has listed file:///H:/PathToMyAddin/MyAddin.vsto as untrusted. Contact your administrator for further assistance. at Microsoft.VisualStudio.Tools.Office.Runtime.RuntimeUtilities.VerifySolutionUri(Uri uri) at Microsoft.VisualStudio.Tools.Office.Runtime.DomainCreator.CreateCustomizationDomainInternal(String solutionLocation, String manifestName, String documentName, Boolean showUIDuringDeployment, IntPtr hostServiceProvider, IntPtr& executor) The Zone of the assembly that failed was: MyComputer It seems like like maybe this is due to it trying to load different version of .NET is the same process/AppDomain. However the error would indicate it's some sort of permissions issue.

    Read the article

  • Building a VS2010 solution from TFS2008

    - by slugster
    I have a TFS 2008 Build Agent that has been used to build .Net 3.5 applications. I now have a .Net 4.0 app which i want to compile on the same build agent. I have ensured that MSBuild 4.0 is installed on there and all the required componentry is also installed, but i am getting the following MSB4062 error when building: [Any CPU/Release] C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets(244,5): error MSB4062: The "Microsoft.WebApplication.Build.Tasks.GetSilverlightItemsFromProperty" task could not be loaded from the assembly C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.Build.Tasks.dll. Could not load file or assembly 'file:///C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.Build.Tasks.dll' or one of its dependencies. This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded. Confirm that the declaration is correct, and that the assembly and all its dependencies are available. I am presuming that i get this because the TFSBuild.proj gets executed by MSBuild 3.5 which in turn means my solution is compiled with MSBuild 3.5. Am i correct with my diagnosis? Is there any way to ensure that TFS2008 uses MSBuild 4.0 for my solution? Can it be done on a single team project so that it doesn't affect any other team projects being built on the same build agent? Note that i have checked the question Build failing - VS2010 solution on TFS2008 and this is not a duplicate. Thanks :)

    Read the article

  • Silverlight and WCF Ria Services

    - by Flex_Addicted
    Hi guys, I've created a new Silverlight 3 Business Application with VS 2008. The creation has completed correctly. When I try to open the xaml, it opens but in meanwhile this error is shown: Failed to load metadata assembly System.Windows.Controls.Data.Input.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)An exception of type ArgumentNullException was caught when calling IRegisterMetadata on type System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration. Exception Message: Value cannot be null. Parameter name: type. Stack Trace: at Microsoft.Windows.Design.Metadata.AttributeTableBuilder.AddCallback(Type type, AttributeCallback callback) at System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration.AddAttributes(AttributeTableBuilder builder) at System.Windows.Controls.Design.Common.MetadataRegistrationBase.BuildAttributeTable() at System.Windows.Controls.Data.Input.VisualStudio.Design.MetadataRegistration.Register() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)Failed to load metadata assembly System.Windows.Controls.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger)Failed to load metadata assembly System.Windows.Controls.Navigation.Design, Version=2.0.5.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35. Exception message: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.. Stack Trace: at System.Reflection.Module._GetTypesInternal(StackCrawlMark& stackMark) at System.Reflection.Assembly.GetTypes() at MS.Internal.Package.MetadataLoader.RegisterDesignTimeMetadata(Assembly assembly, LogCallback logger) Why? Any solutions? Thank you in advance.

    Read the article

  • Insufficient Permissions Problems with MSDeploy and TFS Build 2010

    - by jdanforth
    I ran into these problems on a TFS 2010 RC setup where I wanted to deploy a web site as part of the nightly build: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3481): Web deployment task failed.(An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity performing the operation was 'NT AUTHORITY\NETWORK SERVICE'.)  An error occurred when reading the IIS Configuration File 'MACHINE/REDIRECTION'. The identity performing the operation was 'NT AUTHORITY\NETWORK SERVICE'. Filename: \\?\C:\Windows\system32\inetsrv\config\redirection.config Error: Cannot read configuration file due to insufficient permissions  As you can see I’m running the build service as NETWORK SERVICE which is quite usual. The first thing I did then was to give NETWORK SERVICE read access to the whole directory where redirection.config is sitting; C:\Windows\system32\inetsrv\config. That gave me a new error: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3481): Web deployment task failed. (Attempted to perform an unauthorized operation.) The reason for this problem was that NETWORK SERVICE didn’t have write permission to the place where I’ve told MSDeploy to put the web site physically on the disk. Once I’d given the NETWORK SERVICE the right permissions, MSDeploy completed as expected! NOTE! I’ve not had this problem with TFS 2010 RTM, so it might be just a RC issue!

    Read the article

  • Can't install Nuget or other extension to VS2012 on Win8

    - by VinnyG
    When I try to install any extension for visual studio ultimate 2012 on my new installation of Winodws 8 I get this exception : System.IO.FileNotFoundException: The system cannot find the file specified. (Exception from HRESULT: 0x80070002) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at Microsoft.VisualStudio.Settings.ExternalSettingsManager.GetScopePaths(String applicationPath, String suffixOrName, String vsVersion, Boolean isLogged, Boolean isForIsolatedApplication) at Microsoft.VisualStudio.Settings.ExternalSettingsManager.CreateForApplication(String applicationPath) at VSIXInstaller.App.GetExtensionManager(SupportedVSSKU sku) at VSIXInstaller.App.GetExtensionManagerForApplicableSKU(SupportedVSSKU supportedSKU, IInstallableExtension installableExtension, List`1 applicableSKUs) at VSIXInstaller.App.InitializeInstall() at System.Threading.Tasks.Task.InnerInvoke() at System.Threading.Tasks.Task.Execute() I tryed to repair VS, did not work, and also try to uninstall/install and got the same problem. Anybody as an idea?

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >