Microsoft Visual Studio

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

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 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
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
I decommissioned a database analysis server and need to move a tabular  model to a new server. I open the project in Visual Studio, change the workspace server yet when I try to compile I get "cannot build projects that contain more than one .bim file". There is only one .bim file in this project. Where is 2nd one?
0
I am integrating into a webservice, it returns json, here are 2 types of results from it
{"numFound":1,"QTime":77,"attributions":"http://www.gisgraphy.com/attributions.html","result":[{"id":100004730,"lng":36.710459425750635,"lat":-1.336961662155654,"streetName":"Marula Lane","city":"Bulbul","state":"Kajiado","countryCode":"KE","geocodingLevel":"STREET","distance":300.4280656229352,"adm1Name":"Kajiado","formatedFull":"Marula Lane, Bulbul, Kajiado, Kenya","formatedPostal":"Marula Lane, Bulbul","speedMode":"OSM","maxSpeed":"30 mph","azimuthStart":267,"azimuthEnd":251,"length":1161.411457366,"sourceId":33136013}]}



{"numFound":1,"QTime":2537,"attributions":"http://www.gisgraphy.com/attributions.html","result":[{"id":22523950,"lng":36.81669998168945,"lat":-1.2833000421524048,"zipCode":"09831","city":"APO AE","countryCode":"US","geocodingLevel":"CITY","distance":13413.984061400277,"formatedFull":"APO AE,  (09831), United States","formatedPostal":"APO AE, 09831"}]}

Open in new window


I've used the visual studio paste special as JSON class on the first result as that seems to have more info
I'm using the 2nd result as the  test scenario

I then use this code
Result json1 = JsonConvert.DeserializeObject<Result>(jResult);

Open in new window


But all the objects are empty or null

What am I doing wrong?
0
I have a C# project written in Visual Studio 2017.

After creating the project and testing it, I created a installer package using Advanced Installer Software. The package found all the dependencies ok and the installer works fine when I test on my local machine. However, I am concerned whether I should be adding prerequisites and how to determine Which ones I need.
In particular I am not sure about Windows Framework (the installer lets X86 and X64 be selected, my project was compiled for "Any CPU)
Another one is the DotNet Framework. Shoudl I just select the same one I used when compiling my VS project?
Finally, the C++ re-distributable. I have seen programs not install in the past when this is not installed but I am not sure whether I really need to add as pre-requisite and how I determine which version is needed for my application?

Thanks
0
Experts,

I have an asp.net application that has a reportviewer embedded in an aspx page. When I run it locally through visual studio it works fine. When I deploy the application to my app server and run it, the reportviewer gives me the following error:

The permissions granted to user 'domain\appservername$' are insufficient for performing this operation. (rsAccessDenied)

The report viewer isn't picking up my credentials and instead is getting those of the app server. I'm using windows authentication on my site.

Anyone help getting to the bottom of this will be much appreciated.

Regards,
0
I'm in the process of creating a Web page which links to our company database and display data into 2 GridViews. I intend for both of them to be displayed side by side.

I'm using Microsoft Visual Web Developer 2010 Express for this project.

Therefore, I added a table and separated it into 3 columns:

<asp:Table ID="Table3" runat="server" Width = "100%" Font-Bold="True" 
                Font-Names="Arial" Font-Size="Large" BackColor="#B9FFFF" CellPadding="0" 
                CellSpacing="0" Height="18px">

                <asp:TableRow>
                    <asp:TableCell Width = "45%"> Status Time Collector</asp:TableCell>
                    <asp:TableCell Width = "10%"> &nbsp </asp:TableCell>
                    <asp:TableCell Width = "45%"> Actual Quantity Data Collector</asp:TableCell>
                </asp:TableRow>

Open in new window


The result is as follows, (the blue row is the table):
vb-table.JPG
I then try to insert the GridView into the table by dragging GridView into the design and move it within my <asp.table> code:

<asp:Table ID="Table3" runat="server" Width = "100%" Font-Bold="True" 
                Font-Names="Arial" Font-Size="Large" BackColor="#B9FFFF" CellPadding="0" 
                CellSpacing="0" Height="18px">

                <asp:TableRow>
                    <asp:TableCell Width = "45%"> Status Time Collector</asp:TableCell>
                    <asp:TableCell Width = "10%"> &nbsp </asp:TableCell>
                    

Open in new window

0
Hi.  I'm using VB.net and Visual Studio 2008 and Windows Forms.

QUESTION:  
1 WIth the datepicker object, I've blanked out the value initially then I let the user choose a date from the popup calendar.
After a user chooses a date from the popup calendar, then their date is populated into the form's field; however, if they change their mind and want it to go back to blank, it doesn't let them do that -- How do I allow a user to choose a blank option?

2. In a different datepicker field, I want it to be readonly so I've set the property to enabled=false.  Problem is it doesn't look greyed out (it's still white) so user thinks it's a field they're supposed to enter.   How do I make a disabled datepicker field greyed out?
0
I recently got a new laptop with Windows 10 build 1803.  I use Visual Studio Enterprise 2015 Version 14.025431.01 Update 3 and SQL Server Management Studio  Version 17.7.  We use a company's application that is hosted in the Cloud.  When trying to connect to their SQL Servers I get errors in both VS and SSMS.  Others with Windows 10 and a lower build number (1709 and below) have no issues connecting with VS or SSMS.  My Windows 7 computer has no issues connecting.  I have done some searching and have found references to the latest Windows Defender update.  I have not found a fix however.  Can anyone assist in resolving my issues please?  The error messages are below.  

Thank you in advance for your consideration.
Alex

Visual Studio Error:
TITLE: Connection Manager
------------------------------

Test connection failed because of an error in initializing provider. Login timeout expired
A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.
Named Pipes Provider: Could not open a connection to SQL Server [53].

------------------------------
BUTTONS:

OK

SQL Server Management Studio error:
TITLE: Connect to Server
------------------------------

Cannot connect to server.reference.net.

------------------------------
0

Microsoft Visual Studio

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.