Quantcast
Channel: Visual Studio General Questions forum
Viewing all 21115 articles
Browse latest View live

Intellisense crash on refactoring

$
0
0

Hey there,

I've encountered some bug in VS 2013 Ultimate while refactoring some legacy code. When I hit autocompletion I get whitened screen with, Visual goes unresponsive and then it starts again with all editor windows closed.

Visual Studio version: 

Microsoft Visual Studio Ultimate 2013
Version 12.0.30723.00 Update 3

From ActivityLog.xml:

<record>1245</record><time>2014/08/20 12:28:10.551</time><type>Error</type><source>Editor or Editor Extension</source><description>System.InvalidOperationException: fileName doesn&apos;t map to an intellisense view.&#x000D;&#x000A;   at ColorizedSignatureHelp.Classifications.ClassificationTypeManager.GetClassificationType(IFileContext fileContext, String classificationTypeName)&#x000D;&#x000A;   at ColorizedSignatureHelp.Classifiers.BaseSignatureHelpClassifier.GetClassificationSpans(SnapshotSpan span)&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Classification.Implementation.ClassifierTagger.&lt;GetTags&gt;d__0.MoveNext()&#x000D;&#x000A;   at Microsoft.VisualStudio.Text.Tagging.Implementation.TagAggregator`1.&lt;GetTagsForBuffer&gt;d__5.MoveNext()</description>

Anyone?




MS Visual C# 2010/ 2013

$
0
0

Hi all,

maybe primitive question for you but ...... if I start to created a project in visual studio C# 2010 ... can I continue in cisual studio 2013

thanks

Pinned Test Explorer, Error List, and Output unpinned after restart of Visual Studio.

$
0
0

Hello,

I have reviewed some of the previous posts about pinned tabs unpinned after restart.  I think this question is a little different as I have tried the Power Tools and even making sure the option Maintain pin status after window is closed from well is selected.  What I have is the Test Explorer, Error List, and Output views in the Main area.  The same area that source code tabs open.  The center window when the snap grid shows up when moving a tab around.

I have included a screen shot and highlighted the pins in their pinned state.  When I close and restart Visual Studio these pinned tabs are unpinned.  I have not been able to find a solution for Visual Studio to remember the pinned status on these tabs when they are in the main tab area.

Compiler producing C1023 randomly

$
0
0

HI,

I am using Visual studio 2008 SP1 and when I compile my project I randomly get 

"1>c1xx : fatal error C1023: 'SDK2wince7 (ARMv4I)\Debug/XX.pch' : unexpected error with pch, try rebuilding the pch"

And this is getting realy anoying as I have to reboot PC everytime to get rid of this error.

Do you have any solutions to this error?

Regards,

Luka

IIS Relative Paths

$
0
0

Hi. I have an ASP.Net application with JavaScript that we're testing using the local IIS web server option (http://localhost/application) on two development PCs that are set up the same (not identical as we didn't use an image tool) with the same version of VS 2012 and IIS 6.1.

Within the application we use an Ajax call to a web method in an asmx file. On one PC this call requires the application name in the url path (i.e. /application/Documents/Actions.asmx/Method) and on the other it requires a url without the application name (i.e. /Documents/Actions.asmx/Method) and neither works on the other machine. This means we can't run the same code on the two PCs.

Any ideas about why one PC requires the root name and the other doesn't? Maybe a setting in IIS?

Thanks

Neil

 

How to use GIT for source control

$
0
0

Is it just me, or is there actually no information in the VS help system on how to use GIT from within VS? Or is it somewhere else that I've not found yet?

I'm using VS Express 2013.

I'm used to Java Netbeans which integrates seamlessly with various version control systems and can't get my head around how GIT works with VSE.


Peter

Error during "Analyze Solution for Code Clones"

$
0
0

I'm using Visual Studio 2013

An error occurred during the analysis.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.VisualStudio.CodeClone.CSharp.CSharpLanguageService.GetCSharpCompilationForProject(Project project)
   at Microsoft.VisualStudio.CodeClone.CSharp.CSharpFunctionExtractor.Extract(String file)
   at Microsoft.VisualStudio.CodeClone.Implementation.LanguageProviderFunctionExtractor.Extract(String file)
   at Microsoft.VisualStudio.CodeClone.Implementation.IndexUpdater.<>c__DisplayClassa.<ExtractFunctions>b__9()
   at Microsoft.VisualStudio.CodeClone.Implementation.CommonHelpers.Retry(Action action, Action actionOnRetry, Int32 count)
   at Microsoft.VisualStudio.CodeClone.Implementation.IndexUpdater.ExtractFunctions(String file)
   at Microsoft.VisualStudio.CodeClone.Implementation.IndexUpdater.AddNewFunctionsToIndex()
   at Microsoft.VisualStudio.CodeClone.Implementation.IndexUpdater.IncrementalUpdate()
   at Microsoft.VisualStudio.CodeClone.Implementation.IndexUpdater.UpdateIndex()
   at Microsoft.VisualStudio.CodeClone.Implementation.SolutionIndexManager.DoUpdate()
   at Microsoft.VisualStudio.CodeClone.Implementation.SolutionIndexManager.<UpdateIndex>b__5()
   at Microsoft.VisualStudio.CodeClone.Implementation.CommonHelpers.Retry(Action action, Action actionOnRetry, Int32 count)
   at Microsoft.VisualStudio.CodeClone.Implementation.SolutionIndexManager.UpdateIndex(EventHandler`1 progressCallback)
   at Microsoft.VisualStudio.CodeClone.Implementation.CloneAnalysisWorker.DoWork(Object argument)
   at Microsoft.VisualStudio.CodeClone.Package.CloneReportGenerator.<>c__DisplayClasse.<RunWorkerWithProgressWindow>b__a(Object param0, DoWorkEventArgs param1)
   at System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
   at System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

*.aspx.designer.cs is not automatically updating to reflect new controls

$
0
0
when dropping any control on a web form the *.aspx.designer.cs is not automatically updating to reflect the new control

Issues with loading an old .exe file created in Visual Studio 2012

$
0
0
I am attempting to load an exe file created to run on a windows xp machine from my windows 7 machine.  When i double click on it it shows me the hourglass for a few seconds and then it goes away and the application never opens.  I have also checked the task manager to see if it's running and it isn't.  This .exe was created in Visual Basic or Studio and I have been tasked with updating a few things in it but can't get it to open.  Thanks in advance for the help!

VS 2012 Express vs non-Express and getting the Office 2010 Primary InterOp Assembly bootstrapper to showup in Prerequisites

$
0
0

I'm not sure where to put this question, so I'm going to direct it to a general category with the hopes that if there is a better place that some kind soul will move it there.

I'm using Visual Studio Express 2012 for Windows Desktop and my application is using Microsoft Office 2010 Primary Inter Op Assemblies (PIAs). Actually it only uses the 2010 Excel library part of the Office 2010 Inter Op Libraries and some other .NET and Windows Installer "prerequisites".

I can't get the prerequisites to show up in the "Choose which prerequisites to install" list so that I can create a setup program to install all the prerequisite components.

I was able to install the boot-strap for:

  • Microsoft .NET Framework 4 (x86 and x64) and Update for .NET Framework 4 (KB2468871)
  • Windows Installer 4.5

I still have a big yellow caution triangle on ".NET Framework 2.0", but that doesn't seem to cause problems (probably left over from when the app was converted from VS .NET 2005 Express to VS .NET 2010 Express and then to VS Express 2012).

I had moved to VS 2012 because it was easier to add the prerequisites for .net and the windows installer, but I can't seem to get the prerequisites for Office 2010 installed so that it can boot strap the PIAs.  Instead users always have to download them separately and install them separately from the click-once application.

I've downloaded the "office2010pia_bootstrapper.exe" file and ran it.  It puts the boot strap packages in the correct place for the version of Outlook that we have (we have a 32bit version) so it put it in:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bootstrapper\Packages\Office2010PIARedist

I can't find any instructions for installing prerequisites on VS 2012.  Some of the instructions that I found talk about starting the Visual Studio Command Prompt, but Express doesn't have that prompt.

Do I need to have the full version of Visual Studio 2012 or can this be done on VS 2012 Express?

My environment is:

Windows 7 Enterprise SP 1 with 64 bit OS
Microsoft Office Standard 2010 Version 14.0.7116.5000 (32-bit)
Visual Studio Express 2012 for Windows Desktop

I've tried to look for information on PIA prerequisites on VS 2012 Express, but I can only find VS 2010 or below and VS 2013.  I can't use VS 2013 because I can't load any newer version of Internet Explorer than IE8.

Can anyone point me in the right direction to find out how to get the office 2010 prerequisites loaded for VS 2012 Express so that I can get them in my click-once bootstrapper setup program?

Thanks!



Alan Edwards

Cannot Find/Change Platform Toolset in VS2013

$
0
0

I need the change the Platform toolset, but the under "Configuration Propertys" it only lists "Configuration".. So I'm not sure where to go to change it.

Essentially I need to be able to run my C# application on Windows XP.. On my dev machine (Windows 8) I have both VS2013 Ultimate and VS2010 Ultimate installed.

Programmatic build of database project displaying NoViableAltForCharException during debug, slowing down action

$
0
0

I am testing a project in VS2012.

The database project is targeted to SQL Server 2012, and has a SQLCLR Target Framework of .NET Framework 4.5.

One of the table definitions looks like this:

CREATE TABLE [dbo].[adSources] (    
    [SourceID]         INT           NOT NULL,    [ComplianceUnitID] INT           NOT NULL,    [Name]             NVARCHAR (50) NOT NULL,    [DataDomainID]     INT           NOT NULL,    [IsDiscarded]      BIT           CONSTRAINT [DF_adSources_IsDiscarded] DEFAULT ((0)) NOT NULL,    [TXID]             INT           NOT NULL,    CONSTRAINT [PK_adSources] PRIMARY KEY CLUSTERED ([SourceID] ASC),    CONSTRAINT [FK_adSources_adComplianceUnits] FOREIGN KEY ([ComplianceUnitID]) REFERENCES [dbo].[adComplianceUnits] ([ComplianceUnitID]),    CONSTRAINT [FK_adSources_mdDataDomains] FOREIGN KEY ([DataDomainID]) REFERENCES [dbo].[mdDataDomains] ([DataDomainID]),    CONSTRAINT [FK_adSources_tRoots] FOREIGN KEY ([SourceID]) REFERENCES [dbo].[tRoots] ([RootID])
);

When I build the database project from VS 2012, the project builds, no errors, producing TestDb.dacpac.

However, I want to programmatically build the .dacpac file using Microsoft.Build.Evaluation:

var databaseProject = ProjectCollection.GlobalProjectCollection.LoadProject(scioDbProjectPath);
bool databaseBuilt = databaseProject.Build(new[] { "Rebuild" });

When I execute this code in debug mode, the database builds successfully, but in the output window I see 

"A first chance exception of type 'antlr.NoViableAltForCharException' occurred in Microsoft.SqlServer.TransactSql.ScriptDom.dll

While this is a one-time exception and no big deal, our larger project has many tables, and for some reason this exception slows the build time down significantly.

I did discover for this problem that removing the semi-colon from the CREATE TABLE statement actually made the problem go away. But I am having trouble finding any documents that say I shouldn't have the semicolon in place.

So I was able to workaround this problem by removing the semicolons from the SQL files (although I am not sure why I need to remove them at this point and would rather not).

However, in the same project there is a stored procedure definition:

CREATE PROCEDURE [dbo].[purge_tValidationErrors]
AS
BEGIN
    -- SET NOCOUNT ON added to prevent extra result sets from
    -- interfering with SELECT statements.
    SET NOCOUNT ON
    DECLARE @SupercededRuns TABLE (
        BatchRunID int)

    -- get batches where a more recent batch has been run for that source
    WITH ranked_batches AS (
        SELECT BatchRunID,
            -- we want to prioritize completed batches over failed batches (failed batches likely do not have any record level errors)
            DENSE_RANK() OVER (
                PARTITION BY BatchTypeID, SourceID
                ORDER BY 
                    CASE BatchStatusID 
                        WHEN 2 THEN 0 -- successful completion (shared top priority)
                        WHEN 3 THEN 0 -- completion with warnings (shared top priority)
                        WHEN 4 THEN 1 -- total failure is bottom priority
                    END,
                    Start DESC) BatchRank
        FROM tBatchRuns
        -- exclude currently running batches (we don't want to remove old errors until totally replaced by new ones)
        WHERE BatchStatusID != 1
    )
    INSERT INTO @SupercededRuns (BatchRunID)
    SELECT BatchRunID
    FROM ranked_batches
    WHERE BatchRank != 1

    DECLARE @CurrentBatch TABLE (
        ValidationErrorID int
    )

    DECLARE @MaxErrorID int
    DECLARE @Continue bit
    SET @Continue = 1

    -- Break the delete up into batches as one big delete will hose SQL Server
    WHILE @Continue = 1
    BEGIN
        SELECT @MaxErrorID = MAX(ValidationErrorID) FROM @CurrentBatch
        DELETE FROM @CurrentBatch

        INSERT INTO @CurrentBatch (ValidationErrorID)
        SELECT TOP 100 ValidationErrorID FROM tValidationErrors
        WHERE BatchRunID IN (SELECT BatchRunID FROM @SupercededRuns)
            AND ValidationErrorID > ISNULL(@MaxErrorID, 0)
        ORDER BY ValidationErrorID

        BEGIN TRAN

        -- delete error data first
        DELETE FROM tValidationErrorData
        WHERE ValidationErrorID IN (
            SELECT ValidationErrorID
            FROM tValidationErrors 
            WHERE ValidationErrorID IN (SELECT ValidationErrorID FROM @CurrentBatch)
        )

        -- delete errors
        DELETE FROM tValidationErrors
        WHERE ValidationErrorID IN (SELECT ValidationErrorID FROM @CurrentBatch)

        IF @@ROWCOUNT = 0
        BEGIN
            SET @Continue = 0
        END

        COMMIT
    END
END

When my program builds the database project, in my debug window I see 21 occurrences of "A first chance exception of type 'antlr.MismatchedTokenException' occurred in Microsoft.SqlServer.TransactSql.ScriptDom.dll" in the debug window.

I am not sure what to change in the stored procedure file to keep these errors from happening. When I build my full database project (multiple stored procedures, multiple tables, etc...), I see hundreds or thousands of these exceptions. I am pretty sure the developer is just using design tools and not writing all this SQL by hand, but I can't be sure.

Is there some version disconnect that would cause this problem? It slows my automation down considerably, and I would like to think there is a solution that I am just missing.

According to the debug output, MSBuild is loading C:\windows\Microsoft.Net\assembly\GAC_MSIL\Microsoft.SqlServer.TransactSql.ScriptDom\v4.0_12.0.0.0__89845dcd8080cc91\Microsoft.SqlServer.TransactSql.ScriptDom.dll

As I mentioned above, everything works - the database builds with all the tables and sprocs, but it just slows down everything, and I don't know why those exceptions are occurring.


0x800a138f - JavaScript runtime error: Unable to get property 'toJSON' of undefined or null reference

$
0
0

We are migrating a VS2008 website to VS2013. When we try to run the website on the local host we get the error in the subject line. We can break or continue. If we continue the Java Script works. We are running on Server 2012 R2 and VS 2013 Update 1 and .NET 4.5.1. We know it has something to do with this Java inline script block so we created a very small sample program and recreated the error using a new website project. Here is the web page code:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits="_Default" %><!DOCTYPE html><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"><title>Nebraska Workers' Compensation Court</title></head><body><form id="form1" runat="server"><div><h1">Nebraska Workers' Compensation Court</h1><p><script type="text/javascript">
	    Today = new Date();
	    var Date = Today.getDate();
	    var whichDay = new Array('SUNDAY', 'MONDAY', 'TUESDAY', 'WEDNESDAY',
		'THURSDAY', 'FRIDAY', 'SATURDAY');
	    var DayName = whichDay[Today.getDay()];
	    var whichMonth = new Array('JANUARY', 'FEBRUARY', 'MARCH', 'APRIL', 'MAY',
		'JUNE', 'JULY', 'AUGUST', 'SEPTEMBER', 'OCTOBER', 'NOVEMBER', 'DECEMBER');
	    var MonthName = whichMonth[Today.getMonth()];
	    var Year = Today.getFullYear();
	    document.write(DayName + ", " + MonthName + " " + Date + ", " + Year);</script></p></div></form></body></html>

It works on VS2008 so we are stumped on why it does not work on VS2013?

Anybody have suggestions on how to resolve the unhandled exception?

Bruce


How to move Workspace View Window?

$
0
0

Dear MS Support Admin -

RE: MS Visual C++ Std Edition Workspace View Window

I was wondering if you could help me figure out how to move the workspace bar (the one with 'file view' , 'resource view' etc. tabs)
from the right side of the screen back to the left side. I accidentally hit some shortcut key and the bar moved over
there (from the left side where I am very accustomed to it being). As it is not a normal window (i.e. it "lives" within the
open workspace) I CANNOT slide it from the title bar (like one can other windows).

Thanks for your help,
- Nick

SQL Database for an internal website

$
0
0

I've got VS2013 installed and ready to go, but I'm unsure of what route to take on what I'm trying to achieve.

Basically, at my company, we have an intranet that all the employee's have access to who are on our network.

I want to put together a SQL Database that will store information such as name, employee number, emails, location, points (part of our health and wellness program), and be able to grab that information and show it on our site based on either..

a. Search buttons (aka, "Enter your number and search to see how many points you have")

or

b. (my end goal) Have a portion of the site where they can login and on their specific portion of their site see all their information from the database, (kind of like a profile page I guess.)

What kind of project do I need to create for this? I've tried fiddling with a sql-based database template, but I couldn't find a way to add data to the table after I had created it.

Any kind of insight that anyone can give would be absolutely wonderful!


Getting Average of Values in a report

$
0
0
I have created a visual studio program that lets me query a report based on the date.  I have a button and text box at the bottom.  I want to be able to click the button and it gives me the average of the values(Shown in that text box) that have just been queried.  Any help would be great.  

Publishing programs created in Visual Studio Express

$
0
0

Hi :)

i 've created a program in visual studio express. Is it legal to publish it (i mean for free, program doesnt include any ads and its free) for non commercial use?

Thanks  a lot for response. I would like to share my program but i dont want to get into legal troubles :)

Visual studio Web access - Work item

$
0
0

I am using Web version of TFS. Most of the times, it is required to send work items through email. Is there a way where we can send the attachements related to that work items in the email.

HRESULT when intelli sense tries to complete a word

$
0
0

Hi Everyone,

I have tried finding a solution to this problem a long time but with no luck. What happens is every now and again (recently more than I like it to happen) when ever intelli sense tries to complete a word, I get the following error:

'Exception from HRESULT: 0x93A92D10'

This information is for me as helpful as trying to decipher Hieroglyphs. Anyway, once this error has occurred any other attempt of using intelli sense to complete any code will reproduce this error. As you can see this is very annoying in trying to code anything. This happens only to larger projects. We do use Devexpress, some smaller custom controls, and Stimulsoft for a few reports. Furthermore the IDE will crash if you continue coding (getting the error and trying to continue a few times after just clicking ok). 

Mostly when I get the error I will restart the IDE, which tends to happen more often now.

Can anyone help me in finding out what this error is/means and possibly how to fix it.

We use VS 2010, TFS, Windows Forms Project VB.Net 4.0 linked to SQL Database

Many Thanks in advance.

UDP Connection between ASP and WINFORM

$
0
0

I'm Not sure if this is the correct place for this post but, hope I could some assistance anyway.

I have a pair of WINFORM ( "sendViaUPD" and "ReceiveViaUDP") that sends a text string from the client to the server using a UDP connection.

I need to find a way to send a similar string from a webpage to the server form. This is the code I have:

Imports System.Net.Sockets
Imports System.Net

Public Class WebForm1
    Inherits System.Web.UI.Page
    Dim udpClient As New UdpClient
    Dim GLOIP As IPAddress
    Dim GLOINTPORT As Integer
    Dim bytCommand As Byte() = New Byte() {}

    Private Sub cmdSend_Click(sender As Object, e As EventArgs) Handles cmdSend.Click
        Dim pRet As Integer
        Try
            GLOIP = IPAddress.Parse(txtIP.Text)
            GLOINTPORT = txtPort.Text
            udpClient.Connect(GLOIP, GLOINTPORT)
            bytCommand = Encoding.ASCII.GetBytes(txtMessage.Text)
            pRet = udpClient.Send(bytCommand, bytCommand.Length)
            txtInfo.Text = "INFORMATION" & vbCrLf & "No of bytes sent " & pRet
            txtInfo.Text = txtInfo.Text & vbCrLf & "The message sent is """ & Encoding.ASCII.GetChars(bytCommand) & """"
        Catch ex As Exception
            txtInfo.Text = txtInfo.Text & ex.Message
        End Try
    End Sub

    Private Sub WebForm1_Unload(sender As Object, e As EventArgs) Handles Me.Unload
        UdpClient.Close()
    End Sub
End Class

from the local host, it receives the string and byte count but from the remote host I get nothing.

Any assistance would be greatly appreciated.

Viewing all 21115 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>