Tag: visual studio

无法加载文件或程序集’System.IdentityModel,Version = 4.0.0.0,Culture = neutral,PublicKeyToken = b77a5c561934e089’或其依赖项之一

我是mvc的新手。 我刚刚安装了Visual Studio 15,当我创建一个mvc项目并运行它时没有任何修改。 它给了我上面提到的错误。 我在另一台电脑上做了同样的事情并且它可以工作但是在我的系统上它给了我错误。 寻找解决方案,但找不到任何具体的。 所以请指导我做什么。

Visual Studio运行不需要的代码

如何让Visual Studio运行某个项目? 我有两个项目,它运行我每次创建的第一个项目。 我正在使用VS 2013

在Visual Studio 2008中打开Visual Studio 2010项目

我在c#和sql客户端上有一个应用程序,visual studio 2010,我想在visual stdio 2008上打开项目,我打开新的解决方案并将项目添加到他。 但在运行时我接受此错误:无法打开,因为它是版本655.此服务器支持版本612及更早版本。 不支持降级路径。

删除位图的黑色背景颜色

我需要在C#VS2013中删除位图的黑色背景颜色。 就像我在canvas上画一些点一样。 canvas是黑色的,我只需要将canvas更改为透明,同时在其上保留彩色点而不做任何更改。 我得到了解决方案: 如何从Bitmap中删除白色背景颜色 Bitmap capcha = new Bitmap(@”C:/image.png”); capcha.MakeTransparent(Color.Black); 但是,背景仍有灰色,如覆盖图像上的点的雾。 如何删除它? 更新我使用的代码: ImageAttribute imageAttribute = new ImageAttribute(); imageAttribute.SetGamma(0.5f, ColorAdjustType.Bitmap); gr.DrawImage(img, new Rectangle(0, 0, img.Width, img.Height), 0, 0, img.Width, img.Height, GraphicsUnit.Pixel, imageAttribute ); 我有同样的事情。 更多C#代码更新以绘制图像: System.Drawing.Bitmap canvasImage = new System.Drawing.Bitmap(xSize, ySize, System.Drawing.Imaging.PixelFormat.Format32bppArgb); canvasImage.MakeTransparent(Color.Black); Graphics g = Graphics.FromImage(canvasImage); System.Drawing.Bitmap tempImage = myDrawImageFunction(myPoints); g.Clear(Color.Transparent); // this […]

DEBUG ERROR:在vc ++项目中使用COM时出现所需的运行时?

我为我的工作创建了一个COM组件。 我也注册了该组件。 在我的系统上,我有两个VM工作站。 在我的第一个工作站,它工作正常。 在我的第二个工作站中,它会显示一个错误框,其中包含此程序需要朗读的消息并以不寻常的方式关闭请联系应用程序管理员 。 我认为这是因为没有在第二个工作中注册dll然后我注册并且它工作正常。 当我试图在win2k8机器上测试相同时,即使我成功注册COM组件,它显示上面说的erroe窗口? 任何人都可以帮我理解这个吗? 提前致谢…

无法转换参数C#/ SQL Server

得到错误: 无法将参数值从字符串转换为Int32 我为我的表单编写代码,最后在运行代码时出现错误。 我试图改变一切,但任何交换给我同样的错误。 我的代码: const string sqlText = “INSERT INTO dbo.bd_formular(facultate,domeniul,specializare,forma_invatamant,d_inscriere,nume_prenume,cod,localitate,judet,tara,strada,numar,bloc,scara,etaj,apartament,sector,cod_p,data_nasterii,locul_nasterii,judet_n,tara_n,sex,stare_civila,cetatenie,cetatenie_op,etnie,incadrare,cnp,serie,numar_cnp,eliberat,e_data,studii_preuni,nume_unitate,spec_fili_profil,oras_s,judet_s,tara_s,forma_de_invatamant,medie_bac,durata_studii,data_absolvirii,tipul_diploma,seria_diploma,numarul_diploma,emis_de_catre,data_emiterii,nr_foi_matricole,introducere_date,semnatura) VALUES (@facultate,@domeniul,@specializare,@forma_invatamant,@d_inscriere,@nume_prenume,@cod,@localitate,@judet,@tara,@strada,@numar,@bloc,@scara,@etaj,@apartament,@sector,@cod_p,@data_nasterii,@locul_nasterii,@judet_n,@tara_n,@sex,@stare_civila,@cetatenie,@cetatenie_op,@etnie,@incadrare,@cnp,@serie,@numar_cnp,@eliberat,@e_data,@studii_preuni,@nume_unitate,@spec_fili_profil,@oras_s,@,@judet_s,@tara_s,@forma_de_invatamant,@medie_bac,@durata_studii,@data_absolvirii,@tipul_diploma,@seria_diploma,@numarul_diploma,@emis_de_catre,@data_emiterii,@nr_foi_matricole,@introducere_date,@semnatura)”; using (var con = new SqlConnection(SqlConnectionString)) using (var comm = new SqlCommand(sqlText, con)) { comm.Parameters.Add(new SqlParameter(“@facultate”, SqlDbType.VarChar) { Value = C1.Text }); comm.Parameters.Add(new SqlParameter(“@domeniul”, SqlDbType.VarChar) { Value = T1.Text }); comm.Parameters.Add(new SqlParameter(“@specializare”, SqlDbType.VarChar) { Value = T2.Text }); comm.Parameters.Add(new SqlParameter(“@forma_invatamant”, SqlDbType.VarChar) […]

‘CSC:CSC(0,0):错误CS2001:找不到源文件。 在进行门控检查时(C#)

我似乎与我的项目有点混淆,每当一个门控构建和签入运行时,我得到以下错误….. Summary | Phase 1 15 error(s), 602 warning(s) Phase 1 – 15 error(s), 602 warning(s) CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessmentCentreEpaFeatures.feature.cs’ could not be found. CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessmentCentreFeatures.feature.cs’ could not be found. CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessorEpaFeatures.feature.cs’ could not be found. CSC:CSC(0,0): Error CS2001: Source file ‘d:\a\3\s\Main\SmartEndPointAssessment\SA.SEPA.Web.UI.Selenium\Features\AssessorFeatures.feature.cs’ could not be […]

如何将此行从C#转换为VB.net(Windows Phone 7)

嗨,我正在研究一些未来项目所需的网络代码,但我无法将此代码从C#更改为VB.net。 有人可以帮忙请求吗? this.btnAdd.Click += btnAdd_Click;

为什么RowPrePaint在所有内容之上,我该如何改变它?

在我构建应用程序时,由于使用了RowPrePaint我遇到了一些问题。 无论代码执行的顺序如何,事件似乎都粘贴在所有内容之上。 我有一个问题,细胞工具提示会在它下面; 我不得不找到一种完全不同的方法来传达细胞的文本。 现在我只是试图显示一个消息框,如果我的If语句不符合,但即使这样也不会显示,除非用户按下Alt键(我已通过关闭并再次运行代码进行检查)。 所以我的问题是为什么RowPrePaint事件将自己置于一切之上并且有没有办法在不将代码移动到cellformatting事件的情况下改变它? 提前致谢。 我在下面包含了我的if语句,但我知道代码本身不是问题。 Dim RSScon As New SqlClient.SqlConnection(“ConnectionString”) Dim cmd As New SqlCommand(“SELECT Comment FROM StepBackTable WHERE Retsch_ID = ‘” & Convert.ToInt32(DataGridView1.Rows(rowindex).Cells(0).Value) & “‘ AND Col_index = ‘” & Convert.ToInt32(columnindex) & “‘;”, RSScon) Dim Rdr_Info As SqlDataReader RSScon.Open() Rdr_Info = cmd.ExecuteReader(CommandBehavior.Default) If Rdr_Info.HasRows Then While Rdr_Info.Read() ViewComForm.Show() ViewComForm.TextBox1.Text = Rdr_Info(“Comment”) […]

资源文件中的控制字符C#

我想在Visual Studio中的resource.resx文件中添加Left-To-Right控制字符。 我通过互联网搜索并在.NET资源文件中遇到了一个名为“ 另一种逃避序列的方法”的教程,该教程为了在资源文件中插入一个unicode字符,按Alt键并从NumPad键入十进制等效的unicode。 但是使用描述的方式,当我键入8206(十进制等效的\ u200e,它插入♫并且输出中也显示相同的字符。有人知道我在做错了什么吗?