[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x

Microsoft Visual Studio

802

Solutions

824

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.

Share tech news, updates, or what's on your mind.

Sign up to Post

Does anybody know how to solve this Git Issue?
 1.pngI'm using Vs 2017 under windows 10, thank you.

The problem is that I've changed the username in the Bitbucket now I don't know how to tell that to vs.
Thank you in Advance
0
Issue adding a local wsdl file for royal mail to visual stusio 2017 in c#.
Print screen f error attached. Invalid URI.
Royal-Mail-API-Shipping-V2--28SOAP-2.zip
error.jpg
0
Hi All,

I have a GL project. This a project will be called by any other project.
One of the feature is showing forms from other project, for example form for sales order :

1. At project A is frmSalesInvoice
2. At project B is frmSalesInvoiceWithRoll

How could I solved this problem ?

Thank you.
0
How do I get Visual Studio 2017 to validate <script> tags in source code with CORS attributes?

Okay, this is an annoyance rather than a life or death problem!  I am working on a website which uses externally hosted scripts in some of its pages.  The script tags have CORS attributes (integrity and crossorigin).  Visual Studio is validating the code against the HTML5 schema.  So Visual Studio is picking these up as warnings in its error list and underlining the code with green squiggly lines.

I know I can just ignore them, or turn validation off.  I'd prefer to have them recognised as valid markup.  Is there any way that I can do that?
0
Daily I deal with serveal webpages, and Dreamweaver does the job with the "manage sites" and the pontial to switch between "local" and "remote" files.

Is this some how possible in Visual Studio?

If I open webpage by FTP in VS, I can´t look at local files and upload a local folder to the FTP.
If i create a project and connect Webpublish, I can´t see the remote files.
0
Creating an SSIS app with VS 2015.  Finally have the pieces connected.  When I run it I receive the below error.
===================================

Failed to start project (Microsoft Visual Studio)

===================================

Error starting debugging. (Microsoft.DataTransformationServices.VsIntegration)

------------------------------
Program Location:

   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.LaunchVsDebugger(IVsDebugger iVsDebugger, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsPackageDebugger.ValidateAndRunDebugger(Int32 flags, IOutputWindow outputWindow, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, ProjectItem startupProjItem, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchActivePackage(Int32 launchOptions)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.LaunchDtsPackage(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)
   at Microsoft.DataTransformationServices.Project.DataTransformationsProjectDebugger.Launch(Int32 launchOptions, DataTransformationsProjectConfigurationOptions options)

===================================

Unable to 

Open in new window

0
How to Set TextBox.Text Value while TextBox bind with MVVM in WPF?
0
Hi I am having problems with a vector that I am populating each element from a structure but the elements seem to be getting partially over written Here is what I am drying to do
STRUCTURE
struct YUV_Buffer
{
	void *pCacheBuf;
	int frameID;
	int height;
	int width;
	YUV_Buffer() { pCacheBuf = NULL, frameID = 0, height = 0, width = 0; }
};

Open in new window

[/Constructors
        YUV_Buffer *nBuffer;
	vector<YUV_Buffer> mBuffer;

Open in new window

Implementing the vector array
Here I create a new instance of the structure from within a while loop each iteration of the loop a new video frame is passed to the structure and then added to the vector as a new element
                        YUV_Buffer *nBuffer = new YUV_Buffer();
			nBuffer->frameID = pmfxInSurface->Data.FrameOrder; // frame number
			nBuffer->width = pmfxInSurface->Info.CropW;                 // frame width
			nBuffer->height = pmfxInSurface->Info.CropH;                // frame height
                        nBuffer->pCacheBuf = pSysFrame;                                     // YUV video buffer
                        mBuffer.emplace_back(*nBuffer);                                      // add structure to vector array
                        SAFE_DELETE_ARRAY(nBuffer);                                            // delete structure

Open in new window

I then for testing that the data in the vector element is correct I do the following with OpenCV
each iteration of the while loop cnt is implemented by 1 and mBuffer[cnt].pCacheBuf) contains the video buffer data
                  cv::Mat picYV12 = cv::Mat(pmfxInSurface->Info.CropH + (pmfxInSurface->Info.CropH / 2), pmfxInSurface->Info.CropW, CV_8UC1, mBuffer[cnt].pCacheBuf);
		  cv::Mat picBGR;
		  cv::cvtColor(picYV12, picBGR, CV_YUV2RGBA_NV12);
		  cv::Mat test;
		  cv::cvtColor(picBGR, test, CV_BGRA2RGBA);
		  cv::imshow("MyVideo", test);
		  cv::waitKey(20);

Open in new window

This code works and OpenCV display the video frame in its own window perfectly my problem is I need to load all video frames into the vector array and be able to access each frame individually from the vector but what is happening is that the last element in the vector seems to be over writing all previous elements so I end up with 3000 elements in the vector all containing the last video frame buffer. It seems that its only the buffer array that is getting over written as the frame numbers are correctly assigned to each element.

I then need to call each frame from the vector in any order I wish, I have been trying to do it this way

Open in new window

0
Hello,
Excel Sheet import changes the format of the column.
I am importing a excel sheet in to grid , the format of the date field is set automatically to Datetime.
Please find the code below.
The requirement is that it treats the column as a text column.

Example:
Dates in the column are 18/06 - 23/06 . When I  import the excel sheet , the cell is blank.

 Private Sub PopulateExcelInDatagrid(ByVal Filename As String)
        Dim oledbCon As OleDb.OleDbConnection
        Dim dt As New DataTable
        Try
            Dim csExcel As String = ("Provider=Microsoft.ACE.OLEDB.12.0; Data Source='" & Filename & " '; " & "Extended Properties=Excel 8.0;")
            oledbCon = New OleDbConnection(csExcel)
            oledbCon.Open()
            dt = oledbCon.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, Nothing)
            oledbCon.Close()
            If dt.Rows.Count <= 0 Then Exit Sub
            Dim excelSheets As [String]() = New [String](dt.Rows.Count - 1) {}
            Dim row As DataRow = dt.Rows(0)
            oledbCon.Open()
            Dim oledbAdapter As New OleDbDataAdapter("select * from [" + row("TABLE_NAME").ToString() + "]", oledbCon)
            oledbCon.Close()
            Dim excelDataSet As New DataSet()
            oledbAdapter.Fill(excelDataSet, "Test")
            Dim excelTable As DataTable = excelDataSet.Tables("Test")
            Dgv.DataSource = excelTable
            With Dgv
                .MasterTemplate.BestFitColumns()
          

Open in new window

0
In the Bartender Label Printing Software, how do I CALL the “CancelPrinting” command in the way in which it includes the “Return to Data Entry Form” Response?
What is the code I would have to write within Bartender's Visual Basic Script Editor?
0
We Published our first MVC 5 application to our IIS 8 development server using Web Deploy.  The deploy was successful however when viewing the website in a browser we noticed that many of the CSS styles were not working.

To troubleshoot, we looked at the files that Web Deploy moved to our server and compared them to what was in our Solution.  We noticed several folders (obj, controller, models and others) were missing on the server directory.  My assumption was, as part of the deployment those files were "bundled up" and now lived in the bin directory or something to that nature.  Honestly, this is beyond my scope of knowledge.  Here's what I knew:

- When I built the application locally and ran it... the CSS was fine.
- When I deployed the application to my server and viewed it... the CSS was messy?

How I got it to work (The wrong way, I'm assuming)

- I deleted all the files from the site folder
- I FTP'ed ALL FILES found in my root folder to the server
- I hit refresh

BINGO!  Everything is working.

So, I'm assuming that is not the right way to do it.  So...

What can I do to fix Web Deploy so it works and loads my pages correctly without have to FTP all the site file.
0
I'm re-writing a few SSRS reports that were on a 2008 SSRS server and deploying those to a 2017 SSRS server.

I have visual studio 2008 on my local pc I write/modify reports and deploy to the 2008 SSRS server. I also have Visual Studio 2017 on my local PC to write/deploy SSRS reports 2017 reports to the 2017 SSRS server.

My 2008 works fine, no issues. My issues are in SSRS 2017. I can write, preview and deploy basic reports to the 2017 server except those using custom assemblies.

I have several 2008 reports using a custom dll. I have that custom dll deployed and running on the destination SSRS 2017 server. I have it configured correctly so they I can deploy a report that uses the dll and I can successfully run the report on the server.

My problem is that I can't preview it on my local machine. I get the following error:

An error occurred during local processing.
Failed to load expression host assembly. Details: Could not load file or assembly 'Zen.Barcode.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=b5ae55aa76d2d9de' or one of its dependencies. Failed to grant permission to execute. (Exception from HRESULT: 0x80131418)

I'm almost positive some config on my local PC is preventing the preview. Has anyone seen this before?
0
I am trying to generate layer for Postgres database using ADO.net, Entity Framework and Postgres Database.
After I select Postgres provider and establishes the connection with the database, the wizard "To choose database object and setting" (Table, view, stored proc, function) doesn't appear and model doesn't get created.
Hence I am unable to select tables and generate layers.
 
Followings are the version used in my project
npgsql (Installed in Visual Studio from NuGet) - 4.0.2
EntityFramework6.npgsql (Installed in Visual Studio from NuGet) - 3.1.1
pgAdmin4
PostgreSQL 9.6
I have included provider name for npgsql in webconfig and appconfig, but still unable to generate layer.
0
All of sudden, I receive this error when running my asp.net app from Visual Studio 2013 and IIS Express - http://localhost:7943/

ERR_CONNECTION_REFUSED

This happens on all browsers and was working fine up until today.

Very strange.

Anyone experience this

*** Found a similar issue on internet, but no solution.
0
Im creating a form. Trying to test buttons on it with the code ive written.

I run debug, form loads for 2 seconds, then it goes back to design mode.

How can I keep it from reverting to design mode, I need to test my buttons.
0
When I compile someone c# code, I got the following warning.  What do I need to resolve this? Any idea?

The primary reference "xxxConfiguration" could not be resolved because it has an indirect dependency on the assembly "xxxAsync, Version=7.05.101.0, Culture=neutral, PublicKeyToken=58aa7495915e0000" which was built against the ".NETFramework,Version=v4.6" framework. This is a higher version than the currently targeted framework ".NETFramework,Version=v4.5".
0
Need a Visual Studio VB script to modify SAPI (5.4) to recognize words such as 'gimmie' in place of 'give me', or 'myname' in place of 'my name'.
I know SAPI provides for this capability; however I am a tcl\tk programmer.

Please advise.
0
I am new to Xamarin and MvvmCross learning with an online tutorial, https://visualstudiomagazine.com/Articles/2018/05/08/Build-a-Xamarin.Forms-Application.aspx which comes with a github code sample at https://github.com/nickrandolph/VisualStudioMagazineMobileCorner 
 
This is clearly a simple application with just a few lines of code, but I ran into a namespace error that prevents the code from compiling. I also tried a different tutorial, the tipcalc tutorial provided by MvvmCross at https://www.mvvmcross.com/documentation/tutorials/tipcalc/the-tip-calc-tutorial but got the exact same namespace error.

Hoping someone can help identify what I am doing wrong. I have used the nuget packages for MvvmCross 6.1.2 and  MvvmCross.Forms 6.1.2 together with Visual Studio 2017 15.7.2. I also installed the Android 8.1 Oreo (SDK Platform 27) since both tutorials mention Android 8.1. No luck getting rid of the namespace issue.

The compilation error is in two parts:
(1) Missing Namespace: "The type or namespace name 'Platforms' does not exist in the namespace 'MvvmCross.Forms' (are you missing an assembly reference?)" on the using statement, "using MvvmCross.Forms.Platforms.Android.Views;"
(2)Missing class:  "The Type or Namespace Name MvxFormsAppCompatActivity Could Not be Found"

Both errors are in ...\XFwMvx.Android\MainActivity.cs
0
Is it possible to open a terminal (integrated terminal) in visual studio code once a powershell terminal and after that a command line terminal (dosbox) without changing the default terminal, via shortcuts ?
0
I am an Access programmer. I posted a question to convert access application to web based.  Now I am planning to move to web development. I came to know there is no way you can convert or move directly to web based programs.
I appreciate if you show some guidelines to start a web program (as if I am new to development).
Appreciate your help.
0
Xamarin question:
I must be missing something simple and cannot seem to find the right words to get a Google response that is relevant.
I have been working on my Android app in an emulator and a device that is connected via cable.  When I disconnect the device from the computer, the program fails to function.
How do I push the app from Visual Studio, to a device and have it work without being connected via cable?
Thank you for any guidance you can provide.
0
Hello Guys
Visual Studio 2013
DevExpress for WInform 18.1

I have created a user control with search lookup edit with some setting which are to be used in whole software.
now i need this user control to be shown in grid as repository item.
Following is the code for User Control
Imports DevExpress.XtraEditors
Imports System.ComponentModel

Public Class UxSLECity
    Private Sub UCSLECity_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Call Sb_Control_Settings()
    End Sub

    Private Sub Sb_Control_Settings()
        Dim l_MaxSize As Size
        l_MaxSize.Height = 22
        l_MaxSize.Width = 0
        Me.MaximumSize = l_MaxSize

        Dim l_MinSize As Size
        l_MinSize.Height = 22
        l_MinSize.Width = 50
        Me.MinimumSize = l_MinSize

        Me.BorderStyle = Windows.Forms.BorderStyle.None

        SLECity.Dock = DockStyle.Fill

        With SLECity
            .Properties.DisplayMember = "Medication"
            .Properties.ValueMember = "ID"
            .Properties.View.Columns.AddField("ID").Visible = False
            .Properties.View.Columns.AddField("Medication").Visible = True
            .Properties.DataSource = Fnc_CreateDT()
        End With

    End Sub

    Private Function Fnc_CreateDT() As DataTable
        Dim l_DT As DataTable = New DataTable("medications")
        With l_DT
            .Columns.Add("ID")
            .Columns.Add("Medication")
            .Rows.Add(1, "atenolol")
            .Rows.Add(2, 

Open in new window

0
Hi,

I am working on the Visual Studio Code editor, I want to achieve is that whenever i make changes to my code and save the file the date, time and a variable string(to be used to summarize what changes done) should be automatically created in the header section of my file where my comments are already inserted. A sample is provided below.

/***************************************************************************************************
Procedure:          dbo.usp_DoSomeStuff
Create Date:        2018-01-25
Author:             Joe Expert
Description:        Verbose description of what the query does goes here. Be specific and don't be
                    afraid to say too much. More is better, than less, every single time. Think about
                    "what, when, where, how and why" when authoring a description.
Call by:            [schema.usp_ProcThatCallsThis]
                    [Application Name]
                    [Job]
                    [PLC/Interface]
Affected table(s):  [schema.TableModifiedByProc1]
                    [schema.TableModifiedByProc2]
Used By:            Functional Area this is use in, for example, Payroll, Accounting, Finance
Parameter(s):       @param1 - description and usage
                    @param2 - description and usage
Usage:              EXEC dbo.usp_DoSomeStuff
                        @param1 = 1,
                        @param2 = 3,
                        @param3 = 2
                    Additional notes or caveats about

Open in new window

0
Hello,I have a project in winforms which takes care of the attendance of the students.In my project I have a form called AttendanceList which has the following:
-a textbox for the Serial number on the NFC tag( the attendance will be based on every student swiping the card over the card reader).
-a combobox where the teacher selects the Course and based on the course,when the teacher clicks a button,the list with all the students should appear.
- a datagridview which displays,updates and deletes the students.
The problem that i'm facing is that when a student registers,he will appear in table RegisterStudent(which is the table for all the registered students).I want to take the values from RegisterStudent(sNr,SN,fName and lName) and insert it in AttendanceList table.This is my method in doing so:
  private void LoadStudents()
        {
            using (SqlConnection conn = new SqlConnection(connstr))
            {
                try
                {
                    using (SqlCommand cmd = new SqlCommand())
                    {
                        string query = "insert into AttendanceList(SN,sNr,fName,lName) select SN, sNr, fName,lName from RegisterStudent p inner join StudentCourses c on p.SN=c.StudentId WHERE  c.CourseId = '" + cmbClassId.SelectedValue.ToString() + "'";
                      // cmd.Parameters.AddWithValue("@CourseId", cmbClassId.Text);
                        cmd.Parameters.AddWithValue("@SN", txtStudentId.Text);
               …
0
Hi,

I've got an SSIS package that looks in a folder for zip files and if it finds them it unzips all of them using C# using a reference to system.io.compression.

This is the example I've used:  example

Here is my code:
using Microsoft.SqlServer.Dts.Runtime;
using System.Runtime.InteropServices;
#region Namespaces
using System;
using System.Data;
using System.Windows.Forms;
#endregion
using System.IO.Compression;
using System.IO;
[assembly: ComVisible(false)]
namespace ST_51121ce851f54f58bb7a111e9711bfb7
{
  
    [Microsoft.SqlServer.Dts.Tasks.ScriptTask.SSISScriptTaskEntryPointAttribute]

    public partial class ScriptMain : Microsoft.SqlServer.Dts.Tasks.ScriptTask.VSTARTScriptObjectModelBase
	{
     
		public void Main()
		{
          
            string zipfullpath = Dts.Variables["User::ZipFullPath"].Value.ToString();
            string inputfolder = Dts.Variables["$Package::InputFolder"].Value.ToString();

            using (ZipArchive arch = ZipFile.OpenRead(zipfullpath))
            { foreach(ZipArchiveEntry entry in arch.Entries)
                {

                    try
                    {
                        entry.ExtractToFile(Path.Combine(inputfolder, entry.FullName));
                    }
                    catch (Exception ex)
                    {
                        //local variable to update error description
                        

Open in new window

0

Microsoft Visual Studio

802

Solutions

824

Contributors

Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It is used to develop computer programs for Microsoft Windows, as well as web sites, web applications and web services. Visual Studio uses Microsoft software development platforms such as Windows API, Windows Forms, Windows Presentation Foundation, Windows Store and Microsoft Silverlight. It can produce both native code and managed code.