Questions tagged [.net-2.0]
The 2.0 version of the .NET Framework. For questions on .NET Framework generally, use the .net tag.
.net-2.0
2,578
questions
3
votes
1
answer
43
views
FileInfo behaves differently on .NET 2 and .NET 4.8
I have converted a legacy application from .NET 2 to .NET 4.8 and found that the FileInfo API behaves differently on the 2 platforms.
.NET 2:
new FileInfo("C:\a \b").FullName -> "C:\...
1
vote
0
answers
66
views
System.IO.FileNotFoundException: Could not load file or assembly 'System.Runtime, Version=4.1.2.0
I am trying to create a .Net Standard 2.0 library (I am using visual studio 22)
I encountered the following problem while running the project:
Unhandled Exception: System.IO.FileNotFoundException: ...
0
votes
0
answers
123
views
Existing Encryption and Validation method in Machine Key of IIS suddenly stops working
My application is hosted on IIS and it is previously working on SHA 1 and Auto Encryption and Validation method but suddenly it stops working on one server The same application is synced on other ...
0
votes
1
answer
58
views
Why are my input values not binding to my viewmodel?
I am trying to pass input values to an array within my viewmodel. Then loop through the values and save the new changes in each however, every time I submit, the model values come in as null except ...
0
votes
1
answer
343
views
Why add-migration command is giving error although build succeeds in Visual Studio using .NET
I'm new to .NET and keep getting the following error when executing add-migration command in Visual Studio 2022.
Error Details
You must install or update .NET to run this application.
App: C:\Users\...
0
votes
1
answer
122
views
Legacy .NET CF download - Post-deploy error 0x00000001
Using a Windows CE 6.0 device to deploy a C# application using Visual Studio 2005. The device is specified as Windows CE 5.0 in Visual Studio. VS2005 does not have a smart device option for Windows CE ...
1
vote
0
answers
24
views
XmlSerializer much slower when a different constructor for it is used [duplicate]
In .NET 2 I have the following code, which works okay:
public static T DeserializeStream<T>(this Stream xmlStream)
{
XmlSerializer serializer = new XmlSerializer(typeof(T));
using (...
0
votes
1
answer
503
views
What's the Microsoft DI equivalent of Castle.Windsor's DependsOn Dependency.OnValue
I have a .NET Standard 2.0 library which has DI set up in the following way,
container.Register(Component.For<IMyFactory>()
.ImplementedBy<MyFactory>()
.DependsOn(Dependency....
1
vote
1
answer
569
views
C# NET. Framework 2.0 | Make a delay?
How can I make my program wait 1 Second and then doing something?
Like in NET. Framework 4.8 with Task.Delay() but I'm using NET. Framework 2.0 for a project for my old Windows 2000 Laptop. Is there ...
0
votes
3
answers
1k
views
TimeSpan.Parse of string including days dd-hh:mm:ss
The time span I want to parse is of the format dd-hh:mm:ss
It is the output by the Linux command that returns how long a process has been running.
Example:
string s = "5-15:10:20"; // 5 ...
1
vote
1
answer
404
views
Webclient doesnt like UrlEncoded slash. How to make it work?
I'm trying to pass an URL to an API using a .net 2.0 webclient (unable to upgrade). The webclient call only works if there are no slashes in the encoded value. Any idea why it is failing and how to ...
1
vote
2
answers
2k
views
unity c#, unable to acces a variable form another script
I would like to acces a variable called cooldown from another script called BulletScript and i cant figure out what's wrong with my codes.
Here are my codes:
1st:
using UnityEngine;
public class ...
0
votes
1
answer
278
views
How do I refresh my datagrid view from another form after I insert and update my values inside my database?
I am not sure how to proceed with refreshing the data grid view after I update and insert values into my database. I know that I have to bind the database values to the other form so that they will ...
0
votes
0
answers
60
views
Why can't I update my dates in database from 01/01/1753?
when I update and insert dates into my database they always come out as 01/01/1753
code for updating
cmd.Parameters.Add("@regdate", MySqlDbType.Date).Value = datereg.MinDate;
cmd.Parameters....
0
votes
0
answers
342
views
Why is my datagrid not updating after I update my database?
so I have this refresh and populate function here
private void Refresh()
{
MySqlCommand cmd = conn.CreateCommand();
String data, id, platenumber, brand, model, yearmodel, odometer;
cmd....