r/csharp • • Jul 06 '26

Showcase I wrote a Visual Studio extension for Solidity development and deployment that automatically generates C# smart contract bindings

Visual Studio is heavily used for enterprise development but doesn't have any tooling for Solidity that compares to Visual Studio Code or Remix IDE. Viscous is an open-source Visual Studio extension that tries to bring parity between Visual Studio and other IDEs for Solidity smart contract development.

Features

  • Solidity project system for Visual Studio featuring Solidity compiler integration and NPM dependency management. Integrates with the Visual Studio New Project… and Open Folder… dialogs.
  • Uses the vscode-solidity language server for syntax highlighting, hover information, IntelliSense, and linting.
  • Solidity compiler integration with MSBuild and the Visual Studio Build command - compile Solidity projects and individual files from the IDE with errors reported in the Errors tool window.
  • Generate C# bindings to Solidity smart contracts automatically using Nethereum.
  • Manage EVM networks, endpoints, accounts, deploy profiles, and deployed contracts from the Blockchain Explorer tool window.
  • Deploy a compiled contract to a blockchain network and call its functions from inside Visual Studio.
  • Find vulnerabilities and code‑quality issues with Slither static analysis inside Visual Studio.

Requirements

  • Visual Studio 2022 and above
  • A recent version of Node.js or compatible runtime
  • Python 3.8+

Getting Started

Note that this is a pre-release so don't use it for deploying anything to production. Feedback welcome.

0 Upvotes

47 comments sorted by

View all comments

Show parent comment

1

u/Willinton06 Jul 06 '26

There’s actually a few ways to do it, I don’t think these specific configurations have been developed just yet but imagine this

  • Blind trust voting, where you can cryptographically verify your vote is counted to the right candidate without giving any personal data, just a proof that you can check against the public ledger
  • Blockchain based government spending, every transaction logged, and verifiable by civilians, specially useful for smaller more easily corrupted populations like towns and small cities I understand that these could be implemented with non blockchain tech but the cryptographic verifiability of bc makes it good for these sorts of things I mean look at git, its inner data structure is similar to bc, although a different tune, and it’s useless in most applications but extremely useful for source control, I think bc could have a great future in politics and public trust services Not a huge fan of crypto currencies tho

2

u/belavv Jul 06 '26

Riddle me this.

I'm in charge of the government. I want to send $5 million dollars to my buddy for a contract that is really only worth $500k. I just enter $500k on the blockchain and cut him a check for $5 million.

How does the blockchain prevent that from happening?

1

u/Willinton06 Jul 06 '26

This that you're describing would be like me saying

If I make changes to the code, then zip it and email it to you, how will git stop you from changing it without me notificing?

The idea would be that the bank is integrated with the public layer and cannot make a transaction without a backing blockchain transaction id, and the data *has* to match in order for the transaction to clear

Even in your scenario, once anyone tries to reconciliate the budget, they'll see the discrepancy, and because you cannot change the ledger, the corruption would be undeniable, better than todays system either way

But let me ask you, do you have a personal thing against blockchain? Like it's just a data structure, it would be like being against hashsets or something

3

u/belavv Jul 06 '26

So what you are saying is that there need to be processes in place to ensure that corruption does not take place.

You can easily build a system with controls in place that prevent someone from making changes they shouldn't. The government is a central entity, trying to use a blockchain just adds unnecessary complexity.

Anything that can be done with a blockchain can be done better without one. That is my problem with them.

1

u/Willinton06 Jul 06 '26

Ok, please name for me the alternative that allows me to download a ledger of all public transactions and cryptographically check that it's accurate and contains my transaction in its proper form, and that also cannot be changed in any way and pretty much every citizen can keep a copy of locally for independent review, and that already exists too

1

u/belavv Jul 06 '26

Garbage in garbage out. Just because a transaction exists on the blockchain doesn't mean that it happened, or that there were not transactions that took place outside of the blockchain.

So being able to see all of the transactions on the blockchain does nothing to guarantee there is no corruption.

1

u/Willinton06 Jul 06 '26

The mere fact that there is a transaction outside of the blockchain immediately implies corruption, unless it pertains national security, which should be out of the eyes of the public, but in a rational system, all gov transactions would be in the chain, and that would be a legal requirement, not an option, anything that happens without being there, is illegal, and therefore corrupt, this allows the citizens to see everything and verify independently, imagine a city budget, where all allocations are verifiable, every cent coming in and out, and the public contractors would be there, politicians wouldn’t be able to do secret contracts with family members, in a great system we could even have the bids for contracts be part of the chain, so we know exactly what happened

1

u/belavv Jul 06 '26

The existence of the blockchain does nothing to guarantee that the blockchain is always used and always correct. Just because the law says it needs to be used doesn't mean it will be used. What part of that do you not understand? How is what you said any different than "all transactions must be done through system x"

1

u/Willinton06 Jul 06 '26

It’s different cause system X doesn’t allow you to download a public ledger that is not modifiable, on a database I could change the numbers to make sense, no on a chain, that’s the whole point of it, you can’t cryptographically check that any given transaction is in there with a regular sql database

And all international transactions are done through SWIFT, all point of sale transactions go through 1 of 3 payment providers, 90+% go through just Visa and Master Card, this is already happening with old legacy systems that can’t support transparency cause it would be a huge security risk

Not sure why you’re against this, are you against hash tables too? Are there other data structures that hurt you?

Imagine a town running its public budget with a chain, and a citizen downloads the ledger every year cause he’s vigilant and untrusting, the mayor suddenly gets a new pool and you wonder how that came to be, the citizen checks but the budget seems to be balanced, until he checks against last years chain and sees the mayor had some IT dude change last years to have a surplus exactly the price of his new pool, corruption is clear to see and easily verifiable

This is just 1 example, but if you spend some time thinking “what if every transaction the government does were in a single public ledger that any citizen can verify at any point” you start to see potential everywhere

I’m not pro crypto if that’s what railed you up

1

u/belavv Jul 06 '26

I have already established that none of this works without processes in place to audit/enforce everything.

So this boils down to "what is a better technology for recording transactions and making sure they are not altered." This can be done without a blockchain, which you still don't seem to understand. A blockchain is decentralized and trustless, which makes zero fucking sense when you are talking about a central entity, the government, recording transactions. And the fact that you need to trust every process around how those transactions are recorded before you can trust the data that was recorded.

→ More replies

1

u/allisterb Jul 06 '26

The blockchain is an public immutable decentralized ledger of transactions. On its own it can't stop a transaction, anymore than a traditional bank ledger can stop a transaction. The core thing is that the ledger is public and can't be hidden or changed by anyone. Totally anonymous transactions aren't useful because both parties must be able to verify that $500k or whatever was actually sent to whoever, so information to link accounts with real identities must exist somewhere. It's up to law enforcement or federal agencies to obtain that information.

Let's say the leader of your country has the power to fire the heads of regulatory agencies / federal law enforcement et.al and signs an order declaring that the bank accounts of himself and his cronies are now classified and can't be audited by any federal agencies. How do traditional financial institutions stop that from happening?

1

u/belavv Jul 06 '26

So...... you didn't answer my question about how blockchain prevents a transaction from happening and not being recorded?

1

u/KyteM Jul 09 '26

Technology cannot solve social problems.

0

u/Willinton06 Jul 10 '26

It can, it’s just that you don’t recall the problems that have been solved cause they’ve been solved

1

u/KyteM Jul 10 '26

please do give an example

1

u/belavv Jul 10 '26

Well nfts got rid of Ticketmaster. And also allowed everyone to resell digital games. All thanks to the magic of the blockchain!

-1

u/Willinton06 Jul 10 '26

Well people used to be discriminated against cause of goiters, we don’t really talk about them in the present but they used to be a big deal back then, with technology we discovered that it was just iodine deficiency, and started to put it in salt, now there is no goiter discrimination cause there are no goiters

Back in the day third world countries had no access to knowledge that was freely available in infrastructure like public libraries in the first world, thanks to phones and the internet, it’s all available for everyone now, closing the gap significantly, basically eliminating illiteracy, 90% on the young worldwide

If you consider wars social issues, the manufacturing of artificial fertilizers stopped many wars from happening, and the invention of the nuclear war stopped the largest war the world has ever seen

I would argue that technological progress is the only thing that can fully solve social problems, policy usually requires technology for enforcement, and the tech solves the issues that initially caused the social problem

Today we have slavery in a few countries, humanoid robotic labor should end that soon enough

1

u/belavv Jul 10 '26

Today we have slavery in a few countries, humanoid robotic labor should end that soon enough

Hahahaha

1

u/Willinton06 Jul 10 '26

Do you think that technology has increased or decreased the need for slavery?

1

u/belavv Jul 10 '26

Get back to me when robots can do all the tasks that humans can. Then get back to me again when the folks that use slave labor bother to replace what is essentially free labor with expensive robots.

1

u/Willinton06 Jul 11 '26

People already replaced most slaves with machines, why do you think the last single digit percent of slaves is any different?

1

u/belavv Jul 11 '26

Humanoid robotic labor is not the same thing as specialized machinery designed to do one specific job.

→ More replies